diff --git a/_images/021ac4abb7.pdf b/_images/021ac4abb7.pdf deleted file mode 100644 index 88d4800c3ae..00000000000 Binary files a/_images/021ac4abb7.pdf and /dev/null differ diff --git a/_images/021ac4abb7.png b/_images/021ac4abb7.png deleted file mode 100644 index 5905b50614c..00000000000 Binary files a/_images/021ac4abb7.png and /dev/null differ diff --git a/_images/1b82c44202.pdf b/_images/1b82c44202.pdf deleted file mode 100644 index da574abd548..00000000000 Binary files a/_images/1b82c44202.pdf and /dev/null differ diff --git a/_images/1b82c44202.png b/_images/1b82c44202.png deleted file mode 100644 index ed94b7c5f62..00000000000 Binary files a/_images/1b82c44202.png and /dev/null differ diff --git a/_images/2dcollections3d_demo.pdf b/_images/2dcollections3d_demo.pdf deleted file mode 100644 index fc78d445727..00000000000 Binary files a/_images/2dcollections3d_demo.pdf and /dev/null differ diff --git a/_images/338da66ea0.pdf b/_images/338da66ea0.pdf deleted file mode 100644 index 9e85c03c9f8..00000000000 Binary files a/_images/338da66ea0.pdf and /dev/null differ diff --git a/_images/338da66ea0.png b/_images/338da66ea0.png deleted file mode 100644 index b98a18697f5..00000000000 Binary files a/_images/338da66ea0.png and /dev/null differ diff --git a/_images/419f78d190.pdf b/_images/419f78d190.pdf deleted file mode 100644 index d10c61266d1..00000000000 Binary files a/_images/419f78d190.pdf and /dev/null differ diff --git a/_images/419f78d190.png b/_images/419f78d190.png deleted file mode 100644 index 8ebc1ef776a..00000000000 Binary files a/_images/419f78d190.png and /dev/null differ diff --git a/_images/47efe6d94f.pdf b/_images/47efe6d94f.pdf deleted file mode 100644 index 97795184fe6..00000000000 Binary files a/_images/47efe6d94f.pdf and /dev/null differ diff --git a/_images/47efe6d94f.png b/_images/47efe6d94f.png deleted file mode 100644 index 0853b17d924..00000000000 Binary files a/_images/47efe6d94f.png and /dev/null differ diff --git a/_images/4c05f08060.pdf b/_images/4c05f08060.pdf deleted file mode 100644 index 75fb354e685..00000000000 Binary files a/_images/4c05f08060.pdf and /dev/null differ diff --git a/_images/4c05f08060.png b/_images/4c05f08060.png deleted file mode 100644 index bae87146083..00000000000 Binary files a/_images/4c05f08060.png and /dev/null differ diff --git a/_images/4eef60adf8.pdf b/_images/4eef60adf8.pdf deleted file mode 100644 index d8a3445e115..00000000000 Binary files a/_images/4eef60adf8.pdf and /dev/null differ diff --git a/_images/4eef60adf8.png b/_images/4eef60adf8.png deleted file mode 100644 index 76c6c918e06..00000000000 Binary files a/_images/4eef60adf8.png and /dev/null differ diff --git a/_images/57359382a8.pdf b/_images/57359382a8.pdf deleted file mode 100644 index d110378eb2a..00000000000 Binary files a/_images/57359382a8.pdf and /dev/null differ diff --git a/_images/57359382a8.png b/_images/57359382a8.png deleted file mode 100644 index 9cee8bb684a..00000000000 Binary files a/_images/57359382a8.png and /dev/null differ diff --git a/_images/620eaf140f.pdf b/_images/620eaf140f.pdf deleted file mode 100644 index bd55ae77402..00000000000 Binary files a/_images/620eaf140f.pdf and /dev/null differ diff --git a/_images/620eaf140f.png b/_images/620eaf140f.png deleted file mode 100644 index 5da6dcc0992..00000000000 Binary files a/_images/620eaf140f.png and /dev/null differ diff --git a/_images/6c35a17565.pdf b/_images/6c35a17565.pdf deleted file mode 100644 index 34536d7a391..00000000000 Binary files a/_images/6c35a17565.pdf and /dev/null differ diff --git a/_images/6c35a17565.png b/_images/6c35a17565.png deleted file mode 100644 index 2c43bce0829..00000000000 Binary files a/_images/6c35a17565.png and /dev/null differ diff --git a/_images/701028ca64.pdf b/_images/701028ca64.pdf deleted file mode 100644 index 05bcf3b9d2d..00000000000 Binary files a/_images/701028ca64.pdf and /dev/null differ diff --git a/_images/701028ca64.png b/_images/701028ca64.png deleted file mode 100644 index cc5a61092d5..00000000000 Binary files a/_images/701028ca64.png and /dev/null differ diff --git a/_images/752c3d3a86.pdf b/_images/752c3d3a86.pdf deleted file mode 100644 index ff13306ffbe..00000000000 Binary files a/_images/752c3d3a86.pdf and /dev/null differ diff --git a/_images/752c3d3a86.png b/_images/752c3d3a86.png deleted file mode 100644 index 9e1c6c4c501..00000000000 Binary files a/_images/752c3d3a86.png and /dev/null differ diff --git a/_images/7aec218cee.pdf b/_images/7aec218cee.pdf deleted file mode 100644 index e403c3f093b..00000000000 Binary files a/_images/7aec218cee.pdf and /dev/null differ diff --git a/_images/7aec218cee.png b/_images/7aec218cee.png deleted file mode 100644 index d4c361f6c33..00000000000 Binary files a/_images/7aec218cee.png and /dev/null differ diff --git a/_images/85391b58a8.pdf b/_images/85391b58a8.pdf deleted file mode 100644 index ad3dddd49ec..00000000000 Binary files a/_images/85391b58a8.pdf and /dev/null differ diff --git a/_images/85391b58a8.png b/_images/85391b58a8.png deleted file mode 100644 index 69d0e7f90e2..00000000000 Binary files a/_images/85391b58a8.png and /dev/null differ diff --git a/_images/86cbd17f31.pdf b/_images/86cbd17f31.pdf deleted file mode 100644 index c864f48eb5b..00000000000 Binary files a/_images/86cbd17f31.pdf and /dev/null differ diff --git a/_images/86cbd17f31.png b/_images/86cbd17f31.png deleted file mode 100644 index 7568946b7d4..00000000000 Binary files a/_images/86cbd17f31.png and /dev/null differ diff --git a/_images/93bc6c3f0e.pdf b/_images/93bc6c3f0e.pdf deleted file mode 100644 index c83699d747b..00000000000 Binary files a/_images/93bc6c3f0e.pdf and /dev/null differ diff --git a/_images/93bc6c3f0e.png b/_images/93bc6c3f0e.png deleted file mode 100644 index 2a704f2ef7a..00000000000 Binary files a/_images/93bc6c3f0e.png and /dev/null differ diff --git a/_images/9933a7e1e5.pdf b/_images/9933a7e1e5.pdf deleted file mode 100644 index 80515196f0f..00000000000 Binary files a/_images/9933a7e1e5.pdf and /dev/null differ diff --git a/_images/9933a7e1e5.png b/_images/9933a7e1e5.png deleted file mode 100644 index 4e9009d816c..00000000000 Binary files a/_images/9933a7e1e5.png and /dev/null differ diff --git a/_images/9f2e84e526.pdf b/_images/9f2e84e526.pdf deleted file mode 100644 index 2d5deab17a4..00000000000 Binary files a/_images/9f2e84e526.pdf and /dev/null differ diff --git a/_images/9f2e84e526.png b/_images/9f2e84e526.png deleted file mode 100644 index 7e891ae9761..00000000000 Binary files a/_images/9f2e84e526.png and /dev/null differ diff --git a/_images/accented_text.pdf b/_images/accented_text.pdf deleted file mode 100644 index ec24afc89f9..00000000000 Binary files a/_images/accented_text.pdf and /dev/null differ diff --git a/_images/afb29ca921.pdf b/_images/afb29ca921.pdf deleted file mode 100644 index a3323e1945e..00000000000 Binary files a/_images/afb29ca921.pdf and /dev/null differ diff --git a/_images/afb29ca921.png b/_images/afb29ca921.png deleted file mode 100644 index 1320b8bd9fb..00000000000 Binary files a/_images/afb29ca921.png and /dev/null differ diff --git a/_images/agg_buffer_to_array_00.pdf b/_images/agg_buffer_to_array_00.pdf deleted file mode 100644 index b9adbdef08b..00000000000 Binary files a/_images/agg_buffer_to_array_00.pdf and /dev/null differ diff --git a/_images/agg_buffer_to_array_01.pdf b/_images/agg_buffer_to_array_01.pdf deleted file mode 100644 index 8355bdcbd2f..00000000000 Binary files a/_images/agg_buffer_to_array_01.pdf and /dev/null differ diff --git a/_images/align_ylabels.pdf b/_images/align_ylabels.pdf deleted file mode 100644 index 5fb78ebe02b..00000000000 Binary files a/_images/align_ylabels.pdf and /dev/null differ diff --git a/_images/alignment_test.pdf b/_images/alignment_test.pdf deleted file mode 100644 index df3c207c062..00000000000 Binary files a/_images/alignment_test.pdf and /dev/null differ diff --git a/_images/anchored_box01.pdf b/_images/anchored_box01.pdf deleted file mode 100644 index e2177c42789..00000000000 Binary files a/_images/anchored_box01.pdf and /dev/null differ diff --git a/_images/anchored_box02.pdf b/_images/anchored_box02.pdf deleted file mode 100644 index b0b6e3f9c89..00000000000 Binary files a/_images/anchored_box02.pdf and /dev/null differ diff --git a/_images/anchored_box03.pdf b/_images/anchored_box03.pdf deleted file mode 100644 index 0846e945dbb..00000000000 Binary files a/_images/anchored_box03.pdf and /dev/null differ diff --git a/_images/anchored_box04.pdf b/_images/anchored_box04.pdf deleted file mode 100644 index 616587d7e6c..00000000000 Binary files a/_images/anchored_box04.pdf and /dev/null differ diff --git a/_images/annotate_explain.pdf b/_images/annotate_explain.pdf deleted file mode 100644 index d460739541b..00000000000 Binary files a/_images/annotate_explain.pdf and /dev/null differ diff --git a/_images/annotate_simple01.pdf b/_images/annotate_simple01.pdf deleted file mode 100644 index ff167fa2c4d..00000000000 Binary files a/_images/annotate_simple01.pdf and /dev/null differ diff --git a/_images/annotate_simple02.pdf b/_images/annotate_simple02.pdf deleted file mode 100644 index b9093b4a0cf..00000000000 Binary files a/_images/annotate_simple02.pdf and /dev/null differ diff --git a/_images/annotate_simple03.pdf b/_images/annotate_simple03.pdf deleted file mode 100644 index 25074985f15..00000000000 Binary files a/_images/annotate_simple03.pdf and /dev/null differ diff --git a/_images/annotate_simple04.pdf b/_images/annotate_simple04.pdf deleted file mode 100644 index b4b14679128..00000000000 Binary files a/_images/annotate_simple04.pdf and /dev/null differ diff --git a/_images/annotate_simple_coord01.pdf b/_images/annotate_simple_coord01.pdf deleted file mode 100644 index 657a3f51c42..00000000000 Binary files a/_images/annotate_simple_coord01.pdf and /dev/null differ diff --git a/_images/annotate_simple_coord02.pdf b/_images/annotate_simple_coord02.pdf deleted file mode 100644 index 6670da7acf8..00000000000 Binary files a/_images/annotate_simple_coord02.pdf and /dev/null differ diff --git a/_images/annotate_simple_coord03.pdf b/_images/annotate_simple_coord03.pdf deleted file mode 100644 index 9b9c3acdd73..00000000000 Binary files a/_images/annotate_simple_coord03.pdf and /dev/null differ diff --git a/_images/annotate_text_arrow.pdf b/_images/annotate_text_arrow.pdf deleted file mode 100644 index 1479dbfe98e..00000000000 Binary files a/_images/annotate_text_arrow.pdf and /dev/null differ diff --git a/_images/annotate_transform.pdf b/_images/annotate_transform.pdf deleted file mode 100644 index d87c99c83a8..00000000000 Binary files a/_images/annotate_transform.pdf and /dev/null differ diff --git a/_images/annotate_with_units.pdf b/_images/annotate_with_units.pdf deleted file mode 100644 index 383cd61f347..00000000000 Binary files a/_images/annotate_with_units.pdf and /dev/null differ diff --git a/_images/annotation_basic.pdf b/_images/annotation_basic.pdf deleted file mode 100644 index 38183c94d66..00000000000 Binary files a/_images/annotation_basic.pdf and /dev/null differ diff --git a/_images/annotation_demo2_00.pdf b/_images/annotation_demo2_00.pdf deleted file mode 100644 index 1310b05edeb..00000000000 Binary files a/_images/annotation_demo2_00.pdf and /dev/null differ diff --git a/_images/annotation_demo2_01.pdf b/_images/annotation_demo2_01.pdf deleted file mode 100644 index 1929682c624..00000000000 Binary files a/_images/annotation_demo2_01.pdf and /dev/null differ diff --git a/_images/annotation_demo3.pdf b/_images/annotation_demo3.pdf deleted file mode 100644 index 41b1fa21207..00000000000 Binary files a/_images/annotation_demo3.pdf and /dev/null differ diff --git a/_images/annotation_demo_00.pdf b/_images/annotation_demo_00.pdf deleted file mode 100644 index 3e7b7217c0e..00000000000 Binary files a/_images/annotation_demo_00.pdf and /dev/null differ diff --git a/_images/annotation_demo_01.pdf b/_images/annotation_demo_01.pdf deleted file mode 100644 index adfbdeb2fd3..00000000000 Binary files a/_images/annotation_demo_01.pdf and /dev/null differ diff --git a/_images/annotation_demo_02.pdf b/_images/annotation_demo_02.pdf deleted file mode 100644 index 073317dc522..00000000000 Binary files a/_images/annotation_demo_02.pdf and /dev/null differ diff --git a/_images/annotation_polar.pdf b/_images/annotation_polar.pdf deleted file mode 100644 index 5e2d6b4e706..00000000000 Binary files a/_images/annotation_polar.pdf and /dev/null differ diff --git a/_images/anscombe.pdf b/_images/anscombe.pdf deleted file mode 100644 index b657a894dac..00000000000 Binary files a/_images/anscombe.pdf and /dev/null differ diff --git a/_images/arctest.pdf b/_images/arctest.pdf deleted file mode 100644 index 77688f3f372..00000000000 Binary files a/_images/arctest.pdf and /dev/null differ diff --git a/_images/artist_demo.pdf b/_images/artist_demo.pdf deleted file mode 100644 index 5ec62e95229..00000000000 Binary files a/_images/artist_demo.pdf and /dev/null differ diff --git a/_images/artist_demo.png b/_images/artist_demo.png deleted file mode 100644 index 8a95925cff7..00000000000 Binary files a/_images/artist_demo.png and /dev/null differ diff --git a/_images/aspect_loglog.pdf b/_images/aspect_loglog.pdf deleted file mode 100644 index fccb19949fa..00000000000 Binary files a/_images/aspect_loglog.pdf and /dev/null differ diff --git a/_images/auto_subplots_adjust.pdf b/_images/auto_subplots_adjust.pdf deleted file mode 100644 index fe6c7e5a2cf..00000000000 Binary files a/_images/auto_subplots_adjust.pdf and /dev/null differ diff --git a/_images/axes_demo.pdf b/_images/axes_demo.pdf deleted file mode 100644 index aef0ccdc8f5..00000000000 Binary files a/_images/axes_demo.pdf and /dev/null differ diff --git a/_images/axes_props.pdf b/_images/axes_props.pdf deleted file mode 100644 index 04208f70f7a..00000000000 Binary files a/_images/axes_props.pdf and /dev/null differ diff --git a/_images/axhspan_demo.pdf b/_images/axhspan_demo.pdf deleted file mode 100644 index 6a5a2e3fb15..00000000000 Binary files a/_images/axhspan_demo.pdf and /dev/null differ diff --git a/_images/axis_direction_demo_step01.pdf b/_images/axis_direction_demo_step01.pdf deleted file mode 100644 index 0d34f7cde8d..00000000000 Binary files a/_images/axis_direction_demo_step01.pdf and /dev/null differ diff --git a/_images/axis_direction_demo_step02.pdf b/_images/axis_direction_demo_step02.pdf deleted file mode 100644 index 16b0679e1e3..00000000000 Binary files a/_images/axis_direction_demo_step02.pdf and /dev/null differ diff --git a/_images/axis_direction_demo_step03.pdf b/_images/axis_direction_demo_step03.pdf deleted file mode 100644 index 4169b0e4ad8..00000000000 Binary files a/_images/axis_direction_demo_step03.pdf and /dev/null differ diff --git a/_images/axis_direction_demo_step04.pdf b/_images/axis_direction_demo_step04.pdf deleted file mode 100644 index 5141a4b7736..00000000000 Binary files a/_images/axis_direction_demo_step04.pdf and /dev/null differ diff --git a/_images/axis_equal_demo.pdf b/_images/axis_equal_demo.pdf deleted file mode 100644 index 486a6db3cdf..00000000000 Binary files a/_images/axis_equal_demo.pdf and /dev/null differ diff --git a/_images/bar_demo2.pdf b/_images/bar_demo2.pdf deleted file mode 100644 index 94787f2c178..00000000000 Binary files a/_images/bar_demo2.pdf and /dev/null differ diff --git a/_images/bar_stacked.pdf b/_images/bar_stacked.pdf deleted file mode 100644 index 6c2bd34594a..00000000000 Binary files a/_images/bar_stacked.pdf and /dev/null differ diff --git a/_images/bar_unit_demo.pdf b/_images/bar_unit_demo.pdf deleted file mode 100644 index 710c4fa60f7..00000000000 Binary files a/_images/bar_unit_demo.pdf and /dev/null differ diff --git a/_images/barb_demo_00.pdf b/_images/barb_demo_00.pdf deleted file mode 100644 index 275b061c8a4..00000000000 Binary files a/_images/barb_demo_00.pdf and /dev/null differ diff --git a/_images/barb_demo_01.pdf b/_images/barb_demo_01.pdf deleted file mode 100644 index 9db942a1095..00000000000 Binary files a/_images/barb_demo_01.pdf and /dev/null differ diff --git a/_images/barchart_demo.pdf b/_images/barchart_demo.pdf deleted file mode 100644 index 3c0b3751c22..00000000000 Binary files a/_images/barchart_demo.pdf and /dev/null differ diff --git a/_images/barchart_demo1.pdf b/_images/barchart_demo1.pdf deleted file mode 100644 index 1ec8ea81281..00000000000 Binary files a/_images/barchart_demo1.pdf and /dev/null differ diff --git a/_images/barchart_demo2.pdf b/_images/barchart_demo2.pdf deleted file mode 100644 index 3ca7a544043..00000000000 Binary files a/_images/barchart_demo2.pdf and /dev/null differ diff --git a/_images/barcode_demo.pdf b/_images/barcode_demo.pdf deleted file mode 100644 index 4f1e6f64a00..00000000000 Binary files a/_images/barcode_demo.pdf and /dev/null differ diff --git a/_images/barh_demo_00.pdf b/_images/barh_demo_00.pdf deleted file mode 100644 index b330ecfbff3..00000000000 Binary files a/_images/barh_demo_00.pdf and /dev/null differ diff --git a/_images/barh_demo_00.png b/_images/barh_demo_00.png deleted file mode 100644 index 701ea1f697c..00000000000 Binary files a/_images/barh_demo_00.png and /dev/null differ diff --git a/_images/barh_demo_01.pdf b/_images/barh_demo_01.pdf deleted file mode 100644 index 0134acb332b..00000000000 Binary files a/_images/barh_demo_01.pdf and /dev/null differ diff --git a/_images/barh_demo_01.png b/_images/barh_demo_01.png deleted file mode 100644 index 16ee0291031..00000000000 Binary files a/_images/barh_demo_01.png and /dev/null differ diff --git a/_images/bars3d_demo.pdf b/_images/bars3d_demo.pdf deleted file mode 100644 index 5d73be8f30c..00000000000 Binary files a/_images/bars3d_demo.pdf and /dev/null differ diff --git a/_images/bbox_intersect.pdf b/_images/bbox_intersect.pdf deleted file mode 100644 index 18546bce1df..00000000000 Binary files a/_images/bbox_intersect.pdf and /dev/null differ diff --git a/_images/bd04b58f72.pdf b/_images/bd04b58f72.pdf deleted file mode 100644 index 04fed4e6698..00000000000 Binary files a/_images/bd04b58f72.pdf and /dev/null differ diff --git a/_images/bd04b58f72.png b/_images/bd04b58f72.png deleted file mode 100644 index 53f21350196..00000000000 Binary files a/_images/bd04b58f72.png and /dev/null differ diff --git a/_images/boxplot_demo2.pdf b/_images/boxplot_demo2.pdf deleted file mode 100644 index 6fa1e53bf9f..00000000000 Binary files a/_images/boxplot_demo2.pdf and /dev/null differ diff --git a/_images/boxplot_demo3.pdf b/_images/boxplot_demo3.pdf deleted file mode 100644 index b91f2f6ac6b..00000000000 Binary files a/_images/boxplot_demo3.pdf and /dev/null differ diff --git a/_images/boxplot_demo_00.pdf b/_images/boxplot_demo_00.pdf deleted file mode 100644 index 3274807e2ec..00000000000 Binary files a/_images/boxplot_demo_00.pdf and /dev/null differ diff --git a/_images/boxplot_demo_001.pdf b/_images/boxplot_demo_001.pdf deleted file mode 100644 index b6839c24a33..00000000000 Binary files a/_images/boxplot_demo_001.pdf and /dev/null differ diff --git a/_images/boxplot_demo_001.png b/_images/boxplot_demo_001.png deleted file mode 100644 index 46f5ea5ae83..00000000000 Binary files a/_images/boxplot_demo_001.png and /dev/null differ diff --git a/_images/boxplot_demo_01.pdf b/_images/boxplot_demo_01.pdf deleted file mode 100644 index f54760a174f..00000000000 Binary files a/_images/boxplot_demo_01.pdf and /dev/null differ diff --git a/_images/boxplot_demo_011.pdf b/_images/boxplot_demo_011.pdf deleted file mode 100644 index 1d97aff7ea1..00000000000 Binary files a/_images/boxplot_demo_011.pdf and /dev/null differ diff --git a/_images/boxplot_demo_011.png b/_images/boxplot_demo_011.png deleted file mode 100644 index b694bcc9bad..00000000000 Binary files a/_images/boxplot_demo_011.png and /dev/null differ diff --git a/_images/boxplot_demo_02.pdf b/_images/boxplot_demo_02.pdf deleted file mode 100644 index f40c32746df..00000000000 Binary files a/_images/boxplot_demo_02.pdf and /dev/null differ diff --git a/_images/boxplot_demo_021.pdf b/_images/boxplot_demo_021.pdf deleted file mode 100644 index 6e60b5a9913..00000000000 Binary files a/_images/boxplot_demo_021.pdf and /dev/null differ diff --git a/_images/boxplot_demo_021.png b/_images/boxplot_demo_021.png deleted file mode 100644 index 9392e9b4848..00000000000 Binary files a/_images/boxplot_demo_021.png and /dev/null differ diff --git a/_images/boxplot_demo_03.pdf b/_images/boxplot_demo_03.pdf deleted file mode 100644 index b2dba7b3857..00000000000 Binary files a/_images/boxplot_demo_03.pdf and /dev/null differ diff --git a/_images/boxplot_demo_031.pdf b/_images/boxplot_demo_031.pdf deleted file mode 100644 index 3bc72c8b3a4..00000000000 Binary files a/_images/boxplot_demo_031.pdf and /dev/null differ diff --git a/_images/boxplot_demo_031.png b/_images/boxplot_demo_031.png deleted file mode 100644 index 271387dd1a1..00000000000 Binary files a/_images/boxplot_demo_031.png and /dev/null differ diff --git a/_images/boxplot_demo_04.pdf b/_images/boxplot_demo_04.pdf deleted file mode 100644 index 173dcdb2411..00000000000 Binary files a/_images/boxplot_demo_04.pdf and /dev/null differ diff --git a/_images/boxplot_demo_041.pdf b/_images/boxplot_demo_041.pdf deleted file mode 100644 index 07202c6ff94..00000000000 Binary files a/_images/boxplot_demo_041.pdf and /dev/null differ diff --git a/_images/boxplot_demo_041.png b/_images/boxplot_demo_041.png deleted file mode 100644 index a4f7e16e86a..00000000000 Binary files a/_images/boxplot_demo_041.png and /dev/null differ diff --git a/_images/boxplot_demo_05.pdf b/_images/boxplot_demo_05.pdf deleted file mode 100644 index ae23cae845d..00000000000 Binary files a/_images/boxplot_demo_05.pdf and /dev/null differ diff --git a/_images/boxplot_demo_051.pdf b/_images/boxplot_demo_051.pdf deleted file mode 100644 index a034605434d..00000000000 Binary files a/_images/boxplot_demo_051.pdf and /dev/null differ diff --git a/_images/boxplot_demo_051.png b/_images/boxplot_demo_051.png deleted file mode 100644 index 26e795ca949..00000000000 Binary files a/_images/boxplot_demo_051.png and /dev/null differ diff --git a/_images/boxplot_demo_06.pdf b/_images/boxplot_demo_06.pdf deleted file mode 100644 index 98e10800671..00000000000 Binary files a/_images/boxplot_demo_06.pdf and /dev/null differ diff --git a/_images/boxplot_demo_061.pdf b/_images/boxplot_demo_061.pdf deleted file mode 100644 index 7b65fec590c..00000000000 Binary files a/_images/boxplot_demo_061.pdf and /dev/null differ diff --git a/_images/boxplot_demo_061.png b/_images/boxplot_demo_061.png deleted file mode 100644 index f1db1633906..00000000000 Binary files a/_images/boxplot_demo_061.png and /dev/null differ diff --git a/_images/branch_list.png b/_images/branch_list.png deleted file mode 100644 index 1196eb754d3..00000000000 Binary files a/_images/branch_list.png and /dev/null differ diff --git a/_images/branch_list_compare.png b/_images/branch_list_compare.png deleted file mode 100644 index 336afa37460..00000000000 Binary files a/_images/branch_list_compare.png and /dev/null differ diff --git a/_images/break.pdf b/_images/break.pdf deleted file mode 100644 index 40932843440..00000000000 Binary files a/_images/break.pdf and /dev/null differ diff --git a/_images/broken_barh.pdf b/_images/broken_barh.pdf deleted file mode 100644 index b4a5bdefe48..00000000000 Binary files a/_images/broken_barh.pdf and /dev/null differ diff --git a/_images/c097cdcada.pdf b/_images/c097cdcada.pdf deleted file mode 100644 index 11c1af714e0..00000000000 Binary files a/_images/c097cdcada.pdf and /dev/null differ diff --git a/_images/c097cdcada.png b/_images/c097cdcada.png deleted file mode 100644 index 346ee43934e..00000000000 Binary files a/_images/c097cdcada.png and /dev/null differ diff --git a/_images/centered_ticklabels.pdf b/_images/centered_ticklabels.pdf deleted file mode 100644 index 8c868733bbd..00000000000 Binary files a/_images/centered_ticklabels.pdf and /dev/null differ diff --git a/_images/clippath_demo.pdf b/_images/clippath_demo.pdf deleted file mode 100644 index 13eb2856fe8..00000000000 Binary files a/_images/clippath_demo.pdf and /dev/null differ diff --git a/_images/clippath_demo.png b/_images/clippath_demo.png deleted file mode 100644 index 88ecee572ac..00000000000 Binary files a/_images/clippath_demo.png and /dev/null differ diff --git a/_images/clippedline.pdf b/_images/clippedline.pdf deleted file mode 100644 index a77255d6da5..00000000000 Binary files a/_images/clippedline.pdf and /dev/null differ diff --git a/_images/cohere_demo.pdf b/_images/cohere_demo.pdf deleted file mode 100644 index ae8b3a3ec30..00000000000 Binary files a/_images/cohere_demo.pdf and /dev/null differ diff --git a/_images/collections_demo.pdf b/_images/collections_demo.pdf deleted file mode 100644 index a722d637f5b..00000000000 Binary files a/_images/collections_demo.pdf and /dev/null differ diff --git a/_images/color_by_yvalue.pdf b/_images/color_by_yvalue.pdf deleted file mode 100644 index 95e163f1447..00000000000 Binary files a/_images/color_by_yvalue.pdf and /dev/null differ diff --git a/_images/color_cycle.pdf b/_images/color_cycle.pdf deleted file mode 100644 index 2357f9a685e..00000000000 Binary files a/_images/color_cycle.pdf and /dev/null differ diff --git a/_images/color_cycle.png b/_images/color_cycle.png deleted file mode 100644 index 960361dbe53..00000000000 Binary files a/_images/color_cycle.png and /dev/null differ diff --git a/_images/color_demo.pdf b/_images/color_demo.pdf deleted file mode 100644 index 735a34d464f..00000000000 Binary files a/_images/color_demo.pdf and /dev/null differ diff --git a/_images/colorbar_only.pdf b/_images/colorbar_only.pdf deleted file mode 100644 index f439303176a..00000000000 Binary files a/_images/colorbar_only.pdf and /dev/null differ diff --git a/_images/colorbar_tick_labelling_demo_00.pdf b/_images/colorbar_tick_labelling_demo_00.pdf deleted file mode 100644 index e1ae106fc33..00000000000 Binary files a/_images/colorbar_tick_labelling_demo_00.pdf and /dev/null differ diff --git a/_images/colorbar_tick_labelling_demo_01.pdf b/_images/colorbar_tick_labelling_demo_01.pdf deleted file mode 100644 index e7c176c3f15..00000000000 Binary files a/_images/colorbar_tick_labelling_demo_01.pdf and /dev/null differ diff --git a/_images/compound_path.pdf b/_images/compound_path.pdf deleted file mode 100644 index ffea5b5872c..00000000000 Binary files a/_images/compound_path.pdf and /dev/null differ diff --git a/_images/compound_path_demo.pdf b/_images/compound_path_demo.pdf deleted file mode 100644 index a6de32b4ee1..00000000000 Binary files a/_images/compound_path_demo.pdf and /dev/null differ diff --git a/_images/connect_simple01.pdf b/_images/connect_simple01.pdf deleted file mode 100644 index 15e947cce8a..00000000000 Binary files a/_images/connect_simple01.pdf and /dev/null differ diff --git a/_images/connectionstyle_demo.pdf b/_images/connectionstyle_demo.pdf deleted file mode 100644 index 19ed6bb7421..00000000000 Binary files a/_images/connectionstyle_demo.pdf and /dev/null differ diff --git a/_images/contour3d_demo.pdf b/_images/contour3d_demo.pdf deleted file mode 100644 index be404836f82..00000000000 Binary files a/_images/contour3d_demo.pdf and /dev/null differ diff --git a/_images/contour3d_demo2.pdf b/_images/contour3d_demo2.pdf deleted file mode 100644 index 8739a342fca..00000000000 Binary files a/_images/contour3d_demo2.pdf and /dev/null differ diff --git a/_images/contour3d_demo3.pdf b/_images/contour3d_demo3.pdf deleted file mode 100644 index 1c8b73b467f..00000000000 Binary files a/_images/contour3d_demo3.pdf and /dev/null differ diff --git a/_images/contour_demo_00.pdf b/_images/contour_demo_00.pdf deleted file mode 100644 index b471641d4f3..00000000000 Binary files a/_images/contour_demo_00.pdf and /dev/null differ diff --git a/_images/contour_demo_01.pdf b/_images/contour_demo_01.pdf deleted file mode 100644 index 4f70679b413..00000000000 Binary files a/_images/contour_demo_01.pdf and /dev/null differ diff --git a/_images/contour_demo_02.pdf b/_images/contour_demo_02.pdf deleted file mode 100644 index bfdca0abaac..00000000000 Binary files a/_images/contour_demo_02.pdf and /dev/null differ diff --git a/_images/contour_demo_03.pdf b/_images/contour_demo_03.pdf deleted file mode 100644 index 9f6ac197491..00000000000 Binary files a/_images/contour_demo_03.pdf and /dev/null differ diff --git a/_images/contour_demo_04.pdf b/_images/contour_demo_04.pdf deleted file mode 100644 index 12444743159..00000000000 Binary files a/_images/contour_demo_04.pdf and /dev/null differ diff --git a/_images/contour_image.pdf b/_images/contour_image.pdf deleted file mode 100644 index 7abe2107942..00000000000 Binary files a/_images/contour_image.pdf and /dev/null differ diff --git a/_images/contour_label_demo_00.pdf b/_images/contour_label_demo_00.pdf deleted file mode 100644 index 5c09cd7d90d..00000000000 Binary files a/_images/contour_label_demo_00.pdf and /dev/null differ diff --git a/_images/contour_label_demo_01.pdf b/_images/contour_label_demo_01.pdf deleted file mode 100644 index 2f75cdedbea..00000000000 Binary files a/_images/contour_label_demo_01.pdf and /dev/null differ diff --git a/_images/contourf3d_demo.pdf b/_images/contourf3d_demo.pdf deleted file mode 100644 index 52826da0a57..00000000000 Binary files a/_images/contourf3d_demo.pdf and /dev/null differ diff --git a/_images/contourf_demo_00.pdf b/_images/contourf_demo_00.pdf deleted file mode 100644 index 9ed07c7c414..00000000000 Binary files a/_images/contourf_demo_00.pdf and /dev/null differ diff --git a/_images/contourf_demo_01.pdf b/_images/contourf_demo_01.pdf deleted file mode 100644 index 6f4be512e7d..00000000000 Binary files a/_images/contourf_demo_01.pdf and /dev/null differ diff --git a/_images/contourf_log.pdf b/_images/contourf_log.pdf deleted file mode 100644 index 49aaadb6ee5..00000000000 Binary files a/_images/contourf_log.pdf and /dev/null differ diff --git a/_images/coords_demo.pdf b/_images/coords_demo.pdf deleted file mode 100644 index a171084addb..00000000000 Binary files a/_images/coords_demo.pdf and /dev/null differ diff --git a/_images/coords_report.pdf b/_images/coords_report.pdf deleted file mode 100644 index 97f6bfcc0bf..00000000000 Binary files a/_images/coords_report.pdf and /dev/null differ diff --git a/_images/csd_demo.pdf b/_images/csd_demo.pdf deleted file mode 100644 index 265333db62d..00000000000 Binary files a/_images/csd_demo.pdf and /dev/null differ diff --git a/_images/custom_boxstyle01.pdf b/_images/custom_boxstyle01.pdf deleted file mode 100644 index 0de83564fa5..00000000000 Binary files a/_images/custom_boxstyle01.pdf and /dev/null differ diff --git a/_images/custom_boxstyle02.pdf b/_images/custom_boxstyle02.pdf deleted file mode 100644 index 2bac107c13b..00000000000 Binary files a/_images/custom_boxstyle02.pdf and /dev/null differ diff --git a/_images/custom_cmap.pdf b/_images/custom_cmap.pdf deleted file mode 100644 index 318b84a8ddf..00000000000 Binary files a/_images/custom_cmap.pdf and /dev/null differ diff --git a/_images/custom_figure_class.pdf b/_images/custom_figure_class.pdf deleted file mode 100644 index dfcab99aefd..00000000000 Binary files a/_images/custom_figure_class.pdf and /dev/null differ diff --git a/_images/custom_projection_example.pdf b/_images/custom_projection_example.pdf deleted file mode 100644 index a598ab41485..00000000000 Binary files a/_images/custom_projection_example.pdf and /dev/null differ diff --git a/_images/custom_scale_example.pdf b/_images/custom_scale_example.pdf deleted file mode 100644 index e7674a1df8e..00000000000 Binary files a/_images/custom_scale_example.pdf and /dev/null differ diff --git a/_images/custom_ticker1.pdf b/_images/custom_ticker1.pdf deleted file mode 100644 index 6fa37b8e8d7..00000000000 Binary files a/_images/custom_ticker1.pdf and /dev/null differ diff --git a/_images/customize_rc.pdf b/_images/customize_rc.pdf deleted file mode 100644 index 6e0bde71b20..00000000000 Binary files a/_images/customize_rc.pdf and /dev/null differ diff --git a/_images/dannys_example.pdf b/_images/dannys_example.pdf deleted file mode 100644 index 69f85ea3929..00000000000 Binary files a/_images/dannys_example.pdf and /dev/null differ diff --git a/_images/dannys_example.png b/_images/dannys_example.png deleted file mode 100644 index c726cb3681e..00000000000 Binary files a/_images/dannys_example.png and /dev/null differ diff --git a/_images/dash_control.pdf b/_images/dash_control.pdf deleted file mode 100644 index ecbd9341baa..00000000000 Binary files a/_images/dash_control.pdf and /dev/null differ diff --git a/_images/dash_control.png b/_images/dash_control.png deleted file mode 100644 index 1c02e4ddc36..00000000000 Binary files a/_images/dash_control.png and /dev/null differ diff --git a/_images/dashpointlabel.pdf b/_images/dashpointlabel.pdf deleted file mode 100644 index e79b7d92d4a..00000000000 Binary files a/_images/dashpointlabel.pdf and /dev/null differ diff --git a/_images/date_demo.pdf b/_images/date_demo.pdf deleted file mode 100644 index 34d367f5556..00000000000 Binary files a/_images/date_demo.pdf and /dev/null differ diff --git a/_images/date_demo1.pdf b/_images/date_demo1.pdf deleted file mode 100644 index 23d63b86542..00000000000 Binary files a/_images/date_demo1.pdf and /dev/null differ diff --git a/_images/date_demo2.pdf b/_images/date_demo2.pdf deleted file mode 100644 index da6945d9349..00000000000 Binary files a/_images/date_demo2.pdf and /dev/null differ diff --git a/_images/date_demo_convert.pdf b/_images/date_demo_convert.pdf deleted file mode 100644 index 0f17d0fb2df..00000000000 Binary files a/_images/date_demo_convert.pdf and /dev/null differ diff --git a/_images/date_demo_rrule.pdf b/_images/date_demo_rrule.pdf deleted file mode 100644 index ffade8f1953..00000000000 Binary files a/_images/date_demo_rrule.pdf and /dev/null differ diff --git a/_images/date_index_formatter.pdf b/_images/date_index_formatter.pdf deleted file mode 100644 index aaf64b4f2ba..00000000000 Binary files a/_images/date_index_formatter.pdf and /dev/null differ diff --git a/_images/date_index_formatter_00.pdf b/_images/date_index_formatter_00.pdf deleted file mode 100644 index dd9f421eced..00000000000 Binary files a/_images/date_index_formatter_00.pdf and /dev/null differ diff --git a/_images/date_index_formatter_01.pdf b/_images/date_index_formatter_01.pdf deleted file mode 100644 index 545bd85abaa..00000000000 Binary files a/_images/date_index_formatter_01.pdf and /dev/null differ diff --git a/_images/demo_affine_image.pdf b/_images/demo_affine_image.pdf deleted file mode 100644 index f351ddca470..00000000000 Binary files a/_images/demo_affine_image.pdf and /dev/null differ diff --git a/_images/demo_affine_image.png b/_images/demo_affine_image.png deleted file mode 100644 index b5a9117bcd2..00000000000 Binary files a/_images/demo_affine_image.png and /dev/null differ diff --git a/_images/demo_agg_filter.pdf b/_images/demo_agg_filter.pdf deleted file mode 100644 index 946eb0cfabe..00000000000 Binary files a/_images/demo_agg_filter.pdf and /dev/null differ diff --git a/_images/demo_annotation_box.pdf b/_images/demo_annotation_box.pdf deleted file mode 100644 index 55a3799fe57..00000000000 Binary files a/_images/demo_annotation_box.pdf and /dev/null differ diff --git a/_images/demo_axes_divider.pdf b/_images/demo_axes_divider.pdf deleted file mode 100644 index f897e07a98f..00000000000 Binary files a/_images/demo_axes_divider.pdf and /dev/null differ diff --git a/_images/demo_axes_divider.png b/_images/demo_axes_divider.png deleted file mode 100644 index dc502c67dae..00000000000 Binary files a/_images/demo_axes_divider.png and /dev/null differ diff --git a/_images/demo_axes_grid.pdf b/_images/demo_axes_grid.pdf deleted file mode 100644 index 93ffb317773..00000000000 Binary files a/_images/demo_axes_grid.pdf and /dev/null differ diff --git a/_images/demo_axes_grid1.pdf b/_images/demo_axes_grid1.pdf deleted file mode 100644 index 8d8dfc4abd2..00000000000 Binary files a/_images/demo_axes_grid1.pdf and /dev/null differ diff --git a/_images/demo_axes_grid2.pdf b/_images/demo_axes_grid2.pdf deleted file mode 100644 index 7a13c1ea09a..00000000000 Binary files a/_images/demo_axes_grid2.pdf and /dev/null differ diff --git a/_images/demo_axes_rgb_00.pdf b/_images/demo_axes_rgb_00.pdf deleted file mode 100644 index 259f00b758a..00000000000 Binary files a/_images/demo_axes_rgb_00.pdf and /dev/null differ diff --git a/_images/demo_axes_rgb_01.pdf b/_images/demo_axes_rgb_01.pdf deleted file mode 100644 index fe7e3d7e495..00000000000 Binary files a/_images/demo_axes_rgb_01.pdf and /dev/null differ diff --git a/_images/demo_axis_direction.pdf b/_images/demo_axis_direction.pdf deleted file mode 100644 index 7a68229d4ed..00000000000 Binary files a/_images/demo_axis_direction.pdf and /dev/null differ diff --git a/_images/demo_axisline_style.pdf b/_images/demo_axisline_style.pdf deleted file mode 100644 index ae3259e9aa5..00000000000 Binary files a/_images/demo_axisline_style.pdf and /dev/null differ diff --git a/_images/demo_colorbar_with_inset_locator.pdf b/_images/demo_colorbar_with_inset_locator.pdf deleted file mode 100644 index 593bdbd801a..00000000000 Binary files a/_images/demo_colorbar_with_inset_locator.pdf and /dev/null differ diff --git a/_images/demo_curvelinear_grid.pdf b/_images/demo_curvelinear_grid.pdf deleted file mode 100644 index fbc121aac76..00000000000 Binary files a/_images/demo_curvelinear_grid.pdf and /dev/null differ diff --git a/_images/demo_curvelinear_grid1.pdf b/_images/demo_curvelinear_grid1.pdf deleted file mode 100644 index f1a71a959ec..00000000000 Binary files a/_images/demo_curvelinear_grid1.pdf and /dev/null differ diff --git a/_images/demo_curvelinear_grid2.pdf b/_images/demo_curvelinear_grid2.pdf deleted file mode 100644 index 98a1d2d08c8..00000000000 Binary files a/_images/demo_curvelinear_grid2.pdf and /dev/null differ diff --git a/_images/demo_floating_axes.pdf b/_images/demo_floating_axes.pdf deleted file mode 100644 index 3c43d449700..00000000000 Binary files a/_images/demo_floating_axes.pdf and /dev/null differ diff --git a/_images/demo_floating_axes1.pdf b/_images/demo_floating_axes1.pdf deleted file mode 100644 index ab177cdc432..00000000000 Binary files a/_images/demo_floating_axes1.pdf and /dev/null differ diff --git a/_images/demo_floating_axis.pdf b/_images/demo_floating_axis.pdf deleted file mode 100644 index 84fcef6834d..00000000000 Binary files a/_images/demo_floating_axis.pdf and /dev/null differ diff --git a/_images/demo_floating_axis1.pdf b/_images/demo_floating_axis1.pdf deleted file mode 100644 index ae177b311a6..00000000000 Binary files a/_images/demo_floating_axis1.pdf and /dev/null differ diff --git a/_images/demo_gridspec01.pdf b/_images/demo_gridspec01.pdf deleted file mode 100644 index 67b16471d35..00000000000 Binary files a/_images/demo_gridspec01.pdf and /dev/null differ diff --git a/_images/demo_gridspec02.pdf b/_images/demo_gridspec02.pdf deleted file mode 100644 index 185d8d7687e..00000000000 Binary files a/_images/demo_gridspec02.pdf and /dev/null differ diff --git a/_images/demo_gridspec03.pdf b/_images/demo_gridspec03.pdf deleted file mode 100644 index 81d4dfa1357..00000000000 Binary files a/_images/demo_gridspec03.pdf and /dev/null differ diff --git a/_images/demo_gridspec04.pdf b/_images/demo_gridspec04.pdf deleted file mode 100644 index bc0a7313aa5..00000000000 Binary files a/_images/demo_gridspec04.pdf and /dev/null differ diff --git a/_images/demo_gridspec05.pdf b/_images/demo_gridspec05.pdf deleted file mode 100644 index 1953ae053d2..00000000000 Binary files a/_images/demo_gridspec05.pdf and /dev/null differ diff --git a/_images/demo_parasite_axes2.pdf b/_images/demo_parasite_axes2.pdf deleted file mode 100644 index e1365b7f939..00000000000 Binary files a/_images/demo_parasite_axes2.pdf and /dev/null differ diff --git a/_images/demo_parasite_axes2.png b/_images/demo_parasite_axes2.png deleted file mode 100644 index 097dec5be90..00000000000 Binary files a/_images/demo_parasite_axes2.png and /dev/null differ diff --git a/_images/demo_parasite_axes21.pdf b/_images/demo_parasite_axes21.pdf deleted file mode 100644 index 6e078a57c8e..00000000000 Binary files a/_images/demo_parasite_axes21.pdf and /dev/null differ diff --git a/_images/demo_parasite_axes21.png b/_images/demo_parasite_axes21.png deleted file mode 100644 index 097dec5be90..00000000000 Binary files a/_images/demo_parasite_axes21.png and /dev/null differ diff --git a/_images/demo_ribbon_box.pdf b/_images/demo_ribbon_box.pdf deleted file mode 100644 index 2a526567dfc..00000000000 Binary files a/_images/demo_ribbon_box.pdf and /dev/null differ diff --git a/_images/demo_text_path.pdf b/_images/demo_text_path.pdf deleted file mode 100644 index 4a43930853f..00000000000 Binary files a/_images/demo_text_path.pdf and /dev/null differ diff --git a/_images/demo_text_rotation_mode.pdf b/_images/demo_text_rotation_mode.pdf deleted file mode 100644 index 3cd4e16cca5..00000000000 Binary files a/_images/demo_text_rotation_mode.pdf and /dev/null differ diff --git a/_images/demo_ticklabel_alignment.pdf b/_images/demo_ticklabel_alignment.pdf deleted file mode 100644 index aca813aeefd..00000000000 Binary files a/_images/demo_ticklabel_alignment.pdf and /dev/null differ diff --git a/_images/dollar_ticks.pdf b/_images/dollar_ticks.pdf deleted file mode 100644 index 8a8e9090cdd..00000000000 Binary files a/_images/dollar_ticks.pdf and /dev/null differ diff --git a/_images/dolphin.pdf b/_images/dolphin.pdf deleted file mode 100644 index 2c1fa5b3c22..00000000000 Binary files a/_images/dolphin.pdf and /dev/null differ diff --git a/_images/donut_demo.pdf b/_images/donut_demo.pdf deleted file mode 100644 index 17897c2a64f..00000000000 Binary files a/_images/donut_demo.pdf and /dev/null differ diff --git a/_images/e1e2e3079d.pdf b/_images/e1e2e3079d.pdf deleted file mode 100644 index fdd7fff4973..00000000000 Binary files a/_images/e1e2e3079d.pdf and /dev/null differ diff --git a/_images/e1e2e3079d.png b/_images/e1e2e3079d.png deleted file mode 100644 index 36c15cdb43c..00000000000 Binary files a/_images/e1e2e3079d.png and /dev/null differ diff --git a/_images/eb02a08e3c.pdf b/_images/eb02a08e3c.pdf deleted file mode 100644 index 40863c68ab0..00000000000 Binary files a/_images/eb02a08e3c.pdf and /dev/null differ diff --git a/_images/eb02a08e3c.png b/_images/eb02a08e3c.png deleted file mode 100644 index 45cbc4a1cc5..00000000000 Binary files a/_images/eb02a08e3c.png and /dev/null differ diff --git a/_images/ellipse_collection.pdf b/_images/ellipse_collection.pdf deleted file mode 100644 index 0d9545de838..00000000000 Binary files a/_images/ellipse_collection.pdf and /dev/null differ diff --git a/_images/ellipse_demo.pdf b/_images/ellipse_demo.pdf deleted file mode 100644 index 8b1167c2c44..00000000000 Binary files a/_images/ellipse_demo.pdf and /dev/null differ diff --git a/_images/ellipse_rotated.pdf b/_images/ellipse_rotated.pdf deleted file mode 100644 index ad4d228047d..00000000000 Binary files a/_images/ellipse_rotated.pdf and /dev/null differ diff --git a/_images/ellipse_with_units_00.pdf b/_images/ellipse_with_units_00.pdf deleted file mode 100644 index 49ebf8ac06d..00000000000 Binary files a/_images/ellipse_with_units_00.pdf and /dev/null differ diff --git a/_images/ellipse_with_units_01.pdf b/_images/ellipse_with_units_01.pdf deleted file mode 100644 index 69e1a016a22..00000000000 Binary files a/_images/ellipse_with_units_01.pdf and /dev/null differ diff --git a/_images/engineering_formatter.pdf b/_images/engineering_formatter.pdf deleted file mode 100644 index 1d3d3e6674e..00000000000 Binary files a/_images/engineering_formatter.pdf and /dev/null differ diff --git a/_images/equal_aspect_ratio.pdf b/_images/equal_aspect_ratio.pdf deleted file mode 100644 index 47107e49b48..00000000000 Binary files a/_images/equal_aspect_ratio.pdf and /dev/null differ diff --git a/_images/errorbar_demo_00.pdf b/_images/errorbar_demo_00.pdf deleted file mode 100644 index c816b002bcc..00000000000 Binary files a/_images/errorbar_demo_00.pdf and /dev/null differ diff --git a/_images/errorbar_demo_00.png b/_images/errorbar_demo_00.png deleted file mode 100644 index 61d8cda87b1..00000000000 Binary files a/_images/errorbar_demo_00.png and /dev/null differ diff --git a/_images/errorbar_demo_001.png b/_images/errorbar_demo_001.png deleted file mode 100644 index 61d8cda87b1..00000000000 Binary files a/_images/errorbar_demo_001.png and /dev/null differ diff --git a/_images/errorbar_demo_01.pdf b/_images/errorbar_demo_01.pdf deleted file mode 100644 index 2e130090f67..00000000000 Binary files a/_images/errorbar_demo_01.pdf and /dev/null differ diff --git a/_images/errorbar_demo_01.png b/_images/errorbar_demo_01.png deleted file mode 100644 index a3cc72db44b..00000000000 Binary files a/_images/errorbar_demo_01.png and /dev/null differ diff --git a/_images/errorbar_demo_011.png b/_images/errorbar_demo_011.png deleted file mode 100644 index a3cc72db44b..00000000000 Binary files a/_images/errorbar_demo_011.png and /dev/null differ diff --git a/_images/errorbar_limits_00.pdf b/_images/errorbar_limits_00.pdf deleted file mode 100644 index f5a190054de..00000000000 Binary files a/_images/errorbar_limits_00.pdf and /dev/null differ diff --git a/_images/errorbar_limits_01.pdf b/_images/errorbar_limits_01.pdf deleted file mode 100644 index 645342af244..00000000000 Binary files a/_images/errorbar_limits_01.pdf and /dev/null differ diff --git a/_images/evans_test_00.pdf b/_images/evans_test_00.pdf deleted file mode 100644 index 01dd9502e11..00000000000 Binary files a/_images/evans_test_00.pdf and /dev/null differ diff --git a/_images/evans_test_00.png b/_images/evans_test_00.png deleted file mode 100644 index 3bbf9e28b1b..00000000000 Binary files a/_images/evans_test_00.png and /dev/null differ diff --git a/_images/evans_test_01.pdf b/_images/evans_test_01.pdf deleted file mode 100644 index 1a6b131b886..00000000000 Binary files a/_images/evans_test_01.pdf and /dev/null differ diff --git a/_images/evans_test_01.png b/_images/evans_test_01.png deleted file mode 100644 index a9e0ff8dbcb..00000000000 Binary files a/_images/evans_test_01.png and /dev/null differ diff --git a/_images/evans_test_02.pdf b/_images/evans_test_02.pdf deleted file mode 100644 index 6c142e3ccd5..00000000000 Binary files a/_images/evans_test_02.pdf and /dev/null differ diff --git a/_images/evans_test_02.png b/_images/evans_test_02.png deleted file mode 100644 index 2bb20c4f3f2..00000000000 Binary files a/_images/evans_test_02.png and /dev/null differ diff --git a/_images/f04cf46a56.pdf b/_images/f04cf46a56.pdf deleted file mode 100644 index 389cc5dbeb3..00000000000 Binary files a/_images/f04cf46a56.pdf and /dev/null differ diff --git a/_images/f04cf46a56.png b/_images/f04cf46a56.png deleted file mode 100644 index ce66a758c33..00000000000 Binary files a/_images/f04cf46a56.png and /dev/null differ diff --git a/_images/fahrenheit_celcius_scales.pdf b/_images/fahrenheit_celcius_scales.pdf deleted file mode 100644 index 9a6e5695361..00000000000 Binary files a/_images/fahrenheit_celcius_scales.pdf and /dev/null differ diff --git a/_images/fahrenheit_celcius_scales.png b/_images/fahrenheit_celcius_scales.png deleted file mode 100644 index 90229b7f65c..00000000000 Binary files a/_images/fahrenheit_celcius_scales.png and /dev/null differ diff --git a/_images/fancyarrow_demo.pdf b/_images/fancyarrow_demo.pdf deleted file mode 100644 index 296b13ee30b..00000000000 Binary files a/_images/fancyarrow_demo.pdf and /dev/null differ diff --git a/_images/fancybox_demo.pdf b/_images/fancybox_demo.pdf deleted file mode 100644 index b3475ddfab3..00000000000 Binary files a/_images/fancybox_demo.pdf and /dev/null differ diff --git a/_images/fancybox_demo.png b/_images/fancybox_demo.png deleted file mode 100644 index 851a7b92d0f..00000000000 Binary files a/_images/fancybox_demo.png and /dev/null differ diff --git a/_images/fancybox_demo2.pdf b/_images/fancybox_demo2.pdf deleted file mode 100644 index 70e198bd748..00000000000 Binary files a/_images/fancybox_demo2.pdf and /dev/null differ diff --git a/_images/fancytextbox_demo.pdf b/_images/fancytextbox_demo.pdf deleted file mode 100644 index 186ff548dcb..00000000000 Binary files a/_images/fancytextbox_demo.pdf and /dev/null differ diff --git a/_images/fig_axes_customize_simple.pdf b/_images/fig_axes_customize_simple.pdf deleted file mode 100644 index 31220b556bf..00000000000 Binary files a/_images/fig_axes_customize_simple.pdf and /dev/null differ diff --git a/_images/fig_axes_labels_simple.pdf b/_images/fig_axes_labels_simple.pdf deleted file mode 100644 index 41ae795f3c8..00000000000 Binary files a/_images/fig_axes_labels_simple.pdf and /dev/null differ diff --git a/_images/fig_x.pdf b/_images/fig_x.pdf deleted file mode 100644 index 5141ec2a2a6..00000000000 Binary files a/_images/fig_x.pdf and /dev/null differ diff --git a/_images/figimage_demo.pdf b/_images/figimage_demo.pdf deleted file mode 100644 index 14ae6cb0d0b..00000000000 Binary files a/_images/figimage_demo.pdf and /dev/null differ diff --git a/_images/figlegend_demo.pdf b/_images/figlegend_demo.pdf deleted file mode 100644 index 49d24c43f8b..00000000000 Binary files a/_images/figlegend_demo.pdf and /dev/null differ diff --git a/_images/figure_title.pdf b/_images/figure_title.pdf deleted file mode 100644 index 4c2b0496dbc..00000000000 Binary files a/_images/figure_title.pdf and /dev/null differ diff --git a/_images/fill_between_demo_00.pdf b/_images/fill_between_demo_00.pdf deleted file mode 100644 index c4125010f70..00000000000 Binary files a/_images/fill_between_demo_00.pdf and /dev/null differ diff --git a/_images/fill_between_demo_01.pdf b/_images/fill_between_demo_01.pdf deleted file mode 100644 index a65e47eb81f..00000000000 Binary files a/_images/fill_between_demo_01.pdf and /dev/null differ diff --git a/_images/fill_between_demo_02.pdf b/_images/fill_between_demo_02.pdf deleted file mode 100644 index 541dd9555bd..00000000000 Binary files a/_images/fill_between_demo_02.pdf and /dev/null differ diff --git a/_images/fill_betweenx_demo_00.pdf b/_images/fill_betweenx_demo_00.pdf deleted file mode 100644 index b7a35f1a072..00000000000 Binary files a/_images/fill_betweenx_demo_00.pdf and /dev/null differ diff --git a/_images/fill_betweenx_demo_01.pdf b/_images/fill_betweenx_demo_01.pdf deleted file mode 100644 index 2dd2366a90d..00000000000 Binary files a/_images/fill_betweenx_demo_01.pdf and /dev/null differ diff --git a/_images/fill_demo.pdf b/_images/fill_demo.pdf deleted file mode 100644 index 05c87db27b0..00000000000 Binary files a/_images/fill_demo.pdf and /dev/null differ diff --git a/_images/fill_demo2.pdf b/_images/fill_demo2.pdf deleted file mode 100644 index 028007468ae..00000000000 Binary files a/_images/fill_demo2.pdf and /dev/null differ diff --git a/_images/fill_demo3.png b/_images/fill_demo3.png deleted file mode 100644 index edd5a593236..00000000000 Binary files a/_images/fill_demo3.png and /dev/null differ diff --git a/_images/fill_spiral.pdf b/_images/fill_spiral.pdf deleted file mode 100644 index f6967175488..00000000000 Binary files a/_images/fill_spiral.pdf and /dev/null differ diff --git a/_images/filledmarker_demo_00.pdf b/_images/filledmarker_demo_00.pdf deleted file mode 100644 index 6da2747dab0..00000000000 Binary files a/_images/filledmarker_demo_00.pdf and /dev/null differ diff --git a/_images/filledmarker_demo_00.png b/_images/filledmarker_demo_00.png deleted file mode 100644 index 972750d6dbb..00000000000 Binary files a/_images/filledmarker_demo_00.png and /dev/null differ diff --git a/_images/filledmarker_demo_01.pdf b/_images/filledmarker_demo_01.pdf deleted file mode 100644 index d4214c3525e..00000000000 Binary files a/_images/filledmarker_demo_01.pdf and /dev/null differ diff --git a/_images/filledmarker_demo_01.png b/_images/filledmarker_demo_01.png deleted file mode 100644 index 03611a2e3a8..00000000000 Binary files a/_images/filledmarker_demo_01.png and /dev/null differ diff --git a/_images/filledmarker_demo_02.pdf b/_images/filledmarker_demo_02.pdf deleted file mode 100644 index 49d16f91283..00000000000 Binary files a/_images/filledmarker_demo_02.pdf and /dev/null differ diff --git a/_images/filledmarker_demo_02.png b/_images/filledmarker_demo_02.png deleted file mode 100644 index 92273ddac0c..00000000000 Binary files a/_images/filledmarker_demo_02.png and /dev/null differ diff --git a/_images/filledmarker_demo_03.pdf b/_images/filledmarker_demo_03.pdf deleted file mode 100644 index 74bb9cd8d01..00000000000 Binary files a/_images/filledmarker_demo_03.pdf and /dev/null differ diff --git a/_images/filledmarker_demo_03.png b/_images/filledmarker_demo_03.png deleted file mode 100644 index 9d7e20d9bcf..00000000000 Binary files a/_images/filledmarker_demo_03.png and /dev/null differ diff --git a/_images/filledmarker_demo_04.pdf b/_images/filledmarker_demo_04.pdf deleted file mode 100644 index c6de1e66f4f..00000000000 Binary files a/_images/filledmarker_demo_04.pdf and /dev/null differ diff --git a/_images/filledmarker_demo_04.png b/_images/filledmarker_demo_04.png deleted file mode 100644 index d422f28aea8..00000000000 Binary files a/_images/filledmarker_demo_04.png and /dev/null differ diff --git a/_images/filledmarker_demo_05.pdf b/_images/filledmarker_demo_05.pdf deleted file mode 100644 index fa31a797fd3..00000000000 Binary files a/_images/filledmarker_demo_05.pdf and /dev/null differ diff --git a/_images/filledmarker_demo_05.png b/_images/filledmarker_demo_05.png deleted file mode 100644 index e513f766add..00000000000 Binary files a/_images/filledmarker_demo_05.png and /dev/null differ diff --git a/_images/filledmarker_demo_06.pdf b/_images/filledmarker_demo_06.pdf deleted file mode 100644 index 5469609feca..00000000000 Binary files a/_images/filledmarker_demo_06.pdf and /dev/null differ diff --git a/_images/filledmarker_demo_06.png b/_images/filledmarker_demo_06.png deleted file mode 100644 index 3c1467cde41..00000000000 Binary files a/_images/filledmarker_demo_06.png and /dev/null differ diff --git a/_images/filledmarker_demo_07.pdf b/_images/filledmarker_demo_07.pdf deleted file mode 100644 index 3614e5a6aca..00000000000 Binary files a/_images/filledmarker_demo_07.pdf and /dev/null differ diff --git a/_images/filledmarker_demo_07.png b/_images/filledmarker_demo_07.png deleted file mode 100644 index e22a20ccf5f..00000000000 Binary files a/_images/filledmarker_demo_07.png and /dev/null differ diff --git a/_images/filledmarker_demo_08.pdf b/_images/filledmarker_demo_08.pdf deleted file mode 100644 index 0258e90af96..00000000000 Binary files a/_images/filledmarker_demo_08.pdf and /dev/null differ diff --git a/_images/filledmarker_demo_08.png b/_images/filledmarker_demo_08.png deleted file mode 100644 index ba6b73cecc7..00000000000 Binary files a/_images/filledmarker_demo_08.png and /dev/null differ diff --git a/_images/filledmarker_demo_09.pdf b/_images/filledmarker_demo_09.pdf deleted file mode 100644 index 3976e4baab7..00000000000 Binary files a/_images/filledmarker_demo_09.pdf and /dev/null differ diff --git a/_images/filledmarker_demo_09.png b/_images/filledmarker_demo_09.png deleted file mode 100644 index b2bf83a6457..00000000000 Binary files a/_images/filledmarker_demo_09.png and /dev/null differ diff --git a/_images/filledmarker_demo_10.pdf b/_images/filledmarker_demo_10.pdf deleted file mode 100644 index 78b5c4351e1..00000000000 Binary files a/_images/filledmarker_demo_10.pdf and /dev/null differ diff --git a/_images/filledmarker_demo_10.png b/_images/filledmarker_demo_10.png deleted file mode 100644 index 0ccf945f7a1..00000000000 Binary files a/_images/filledmarker_demo_10.png and /dev/null differ diff --git a/_images/filledmarker_demo_11.pdf b/_images/filledmarker_demo_11.pdf deleted file mode 100644 index c05bed37828..00000000000 Binary files a/_images/filledmarker_demo_11.pdf and /dev/null differ diff --git a/_images/filledmarker_demo_11.png b/_images/filledmarker_demo_11.png deleted file mode 100644 index 5a083702cf1..00000000000 Binary files a/_images/filledmarker_demo_11.png and /dev/null differ diff --git a/_images/filledmarker_demo_12.png b/_images/filledmarker_demo_12.png deleted file mode 100644 index af8de2cb495..00000000000 Binary files a/_images/filledmarker_demo_12.png and /dev/null differ diff --git a/_images/finance_demo.pdf b/_images/finance_demo.pdf deleted file mode 100644 index e0f991be4c0..00000000000 Binary files a/_images/finance_demo.pdf and /dev/null differ diff --git a/_images/finance_work2.pdf b/_images/finance_work2.pdf deleted file mode 100644 index b0c56b01c2f..00000000000 Binary files a/_images/finance_work2.pdf and /dev/null differ diff --git a/_images/findobj_demo.pdf b/_images/findobj_demo.pdf deleted file mode 100644 index 05599969495..00000000000 Binary files a/_images/findobj_demo.pdf and /dev/null differ diff --git a/_images/findobj_demo1.png b/_images/findobj_demo1.png deleted file mode 100644 index 6157c71d89c..00000000000 Binary files a/_images/findobj_demo1.png and /dev/null differ diff --git a/_images/fonts_demo.pdf b/_images/fonts_demo.pdf deleted file mode 100644 index 115ada6f4ef..00000000000 Binary files a/_images/fonts_demo.pdf and /dev/null differ diff --git a/_images/fonts_demo_kw.pdf b/_images/fonts_demo_kw.pdf deleted file mode 100644 index a412ee0d162..00000000000 Binary files a/_images/fonts_demo_kw.pdf and /dev/null differ diff --git a/_images/ganged_plots.pdf b/_images/ganged_plots.pdf deleted file mode 100644 index 878db85092b..00000000000 Binary files a/_images/ganged_plots.pdf and /dev/null differ diff --git a/_images/gradient_bar.pdf b/_images/gradient_bar.pdf deleted file mode 100644 index 0dc284e290d..00000000000 Binary files a/_images/gradient_bar.pdf and /dev/null differ diff --git a/_images/grayscale_00.png b/_images/grayscale_00.png deleted file mode 100644 index 94c7f8a85ce..00000000000 Binary files a/_images/grayscale_00.png and /dev/null differ diff --git a/_images/grayscale_01.png b/_images/grayscale_01.png deleted file mode 100644 index e9c3c4031ee..00000000000 Binary files a/_images/grayscale_01.png and /dev/null differ diff --git a/_images/grayscale_02.png b/_images/grayscale_02.png deleted file mode 100644 index 72a2a422905..00000000000 Binary files a/_images/grayscale_02.png and /dev/null differ diff --git a/_images/grayscale_03.png b/_images/grayscale_03.png deleted file mode 100644 index 9d165518fa2..00000000000 Binary files a/_images/grayscale_03.png and /dev/null differ diff --git a/_images/grayscale_04.png b/_images/grayscale_04.png deleted file mode 100644 index 29a4e271a3e..00000000000 Binary files a/_images/grayscale_04.png and /dev/null differ diff --git a/_images/griddata_demo.pdf b/_images/griddata_demo.pdf deleted file mode 100644 index ff2bcb58d21..00000000000 Binary files a/_images/griddata_demo.pdf and /dev/null differ diff --git a/_images/griddata_demo_00_00.png b/_images/griddata_demo_00_00.png deleted file mode 100644 index 25f59d236e8..00000000000 Binary files a/_images/griddata_demo_00_00.png and /dev/null differ diff --git a/_images/hatch_demo.pdf b/_images/hatch_demo.pdf deleted file mode 100644 index af9bd5b859d..00000000000 Binary files a/_images/hatch_demo.pdf and /dev/null differ diff --git a/_images/hexbin_demo.pdf b/_images/hexbin_demo.pdf deleted file mode 100644 index af767ca4b51..00000000000 Binary files a/_images/hexbin_demo.pdf and /dev/null differ diff --git a/_images/hexbin_demo2.pdf b/_images/hexbin_demo2.pdf deleted file mode 100644 index 99e1031c152..00000000000 Binary files a/_images/hexbin_demo2.pdf and /dev/null differ diff --git a/_images/hist3d_demo.pdf b/_images/hist3d_demo.pdf deleted file mode 100644 index c5349b6e76f..00000000000 Binary files a/_images/hist3d_demo.pdf and /dev/null differ diff --git a/_images/hist_colormapped.pdf b/_images/hist_colormapped.pdf deleted file mode 100644 index 38207f8456d..00000000000 Binary files a/_images/hist_colormapped.pdf and /dev/null differ diff --git a/_images/histogram_demo.pdf b/_images/histogram_demo.pdf deleted file mode 100644 index b6f7f5cbe3c..00000000000 Binary files a/_images/histogram_demo.pdf and /dev/null differ diff --git a/_images/histogram_demo.png b/_images/histogram_demo.png deleted file mode 100644 index 887220d6f03..00000000000 Binary files a/_images/histogram_demo.png and /dev/null differ diff --git a/_images/histogram_demo1.pdf b/_images/histogram_demo1.pdf deleted file mode 100644 index f672bfdd05d..00000000000 Binary files a/_images/histogram_demo1.pdf and /dev/null differ diff --git a/_images/histogram_demo1.png b/_images/histogram_demo1.png deleted file mode 100644 index 488e6610cdb..00000000000 Binary files a/_images/histogram_demo1.png and /dev/null differ diff --git a/_images/histogram_demo2.png b/_images/histogram_demo2.png deleted file mode 100644 index 887220d6f03..00000000000 Binary files a/_images/histogram_demo2.png and /dev/null differ diff --git a/_images/histogram_demo3.png b/_images/histogram_demo3.png deleted file mode 100644 index 887220d6f03..00000000000 Binary files a/_images/histogram_demo3.png and /dev/null differ diff --git a/_images/histogram_demo_extended_00.pdf b/_images/histogram_demo_extended_00.pdf deleted file mode 100644 index 8c455ba242a..00000000000 Binary files a/_images/histogram_demo_extended_00.pdf and /dev/null differ diff --git a/_images/histogram_demo_extended_00.png b/_images/histogram_demo_extended_00.png deleted file mode 100644 index cbcc4e43ddb..00000000000 Binary files a/_images/histogram_demo_extended_00.png and /dev/null differ diff --git a/_images/histogram_demo_extended_01.pdf b/_images/histogram_demo_extended_01.pdf deleted file mode 100644 index 93e0ee79401..00000000000 Binary files a/_images/histogram_demo_extended_01.pdf and /dev/null differ diff --git a/_images/histogram_demo_extended_01.png b/_images/histogram_demo_extended_01.png deleted file mode 100644 index 3aa536ae643..00000000000 Binary files a/_images/histogram_demo_extended_01.png and /dev/null differ diff --git a/_images/histogram_demo_extended_02.pdf b/_images/histogram_demo_extended_02.pdf deleted file mode 100644 index 173e0a1658a..00000000000 Binary files a/_images/histogram_demo_extended_02.pdf and /dev/null differ diff --git a/_images/histogram_demo_extended_02.png b/_images/histogram_demo_extended_02.png deleted file mode 100644 index b09df924fbc..00000000000 Binary files a/_images/histogram_demo_extended_02.png and /dev/null differ diff --git a/_images/histogram_demo_extended_03.pdf b/_images/histogram_demo_extended_03.pdf deleted file mode 100644 index f867794f362..00000000000 Binary files a/_images/histogram_demo_extended_03.pdf and /dev/null differ diff --git a/_images/histogram_demo_extended_03.png b/_images/histogram_demo_extended_03.png deleted file mode 100644 index a4ca1299fc5..00000000000 Binary files a/_images/histogram_demo_extended_03.png and /dev/null differ diff --git a/_images/histogram_demo_extended_04.pdf b/_images/histogram_demo_extended_04.pdf deleted file mode 100644 index f2e9abb9844..00000000000 Binary files a/_images/histogram_demo_extended_04.pdf and /dev/null differ diff --git a/_images/histogram_demo_extended_04.png b/_images/histogram_demo_extended_04.png deleted file mode 100644 index 5f3adce0898..00000000000 Binary files a/_images/histogram_demo_extended_04.png and /dev/null differ diff --git a/_images/histogram_demo_extended_05.pdf b/_images/histogram_demo_extended_05.pdf deleted file mode 100644 index e72043c9eef..00000000000 Binary files a/_images/histogram_demo_extended_05.pdf and /dev/null differ diff --git a/_images/histogram_demo_extended_05.png b/_images/histogram_demo_extended_05.png deleted file mode 100644 index b799bf61075..00000000000 Binary files a/_images/histogram_demo_extended_05.png and /dev/null differ diff --git a/_images/histogram_demo_extended_06.png b/_images/histogram_demo_extended_06.png deleted file mode 100644 index f6dc3d1b9d8..00000000000 Binary files a/_images/histogram_demo_extended_06.png and /dev/null differ diff --git a/_images/histogram_path_demo.pdf b/_images/histogram_path_demo.pdf deleted file mode 100644 index 464e80e1df6..00000000000 Binary files a/_images/histogram_path_demo.pdf and /dev/null differ diff --git a/_images/hline_demo.pdf b/_images/hline_demo.pdf deleted file mode 100644 index 23afd4da263..00000000000 Binary files a/_images/hline_demo.pdf and /dev/null differ diff --git a/_images/hline_demo.png b/_images/hline_demo.png deleted file mode 100644 index 3206f895fd3..00000000000 Binary files a/_images/hline_demo.png and /dev/null differ diff --git a/_images/hline_demo1.png b/_images/hline_demo1.png deleted file mode 100644 index 3206f895fd3..00000000000 Binary files a/_images/hline_demo1.png and /dev/null differ diff --git a/_images/image_clip_path.pdf b/_images/image_clip_path.pdf deleted file mode 100644 index 1560561f119..00000000000 Binary files a/_images/image_clip_path.pdf and /dev/null differ diff --git a/_images/image_demo.pdf b/_images/image_demo.pdf deleted file mode 100644 index 37f2cabb2c6..00000000000 Binary files a/_images/image_demo.pdf and /dev/null differ diff --git a/_images/image_demo2.pdf b/_images/image_demo2.pdf deleted file mode 100644 index 09ad21a4e3b..00000000000 Binary files a/_images/image_demo2.pdf and /dev/null differ diff --git a/_images/image_demo3.pdf b/_images/image_demo3.pdf deleted file mode 100644 index 876167b6723..00000000000 Binary files a/_images/image_demo3.pdf and /dev/null differ diff --git a/_images/image_demo3.png b/_images/image_demo3.png deleted file mode 100644 index 61d5fb84266..00000000000 Binary files a/_images/image_demo3.png and /dev/null differ diff --git a/_images/image_interp_00.pdf b/_images/image_interp_00.pdf deleted file mode 100644 index a46ec88d3aa..00000000000 Binary files a/_images/image_interp_00.pdf and /dev/null differ diff --git a/_images/image_interp_01.pdf b/_images/image_interp_01.pdf deleted file mode 100644 index 9feed22f575..00000000000 Binary files a/_images/image_interp_01.pdf and /dev/null differ diff --git a/_images/image_interp_02.pdf b/_images/image_interp_02.pdf deleted file mode 100644 index 57eeeaddb14..00000000000 Binary files a/_images/image_interp_02.pdf and /dev/null differ diff --git a/_images/image_masked.pdf b/_images/image_masked.pdf deleted file mode 100644 index b8a63d7c097..00000000000 Binary files a/_images/image_masked.pdf and /dev/null differ diff --git a/_images/image_nonuniform.pdf b/_images/image_nonuniform.pdf deleted file mode 100644 index 01114a3465c..00000000000 Binary files a/_images/image_nonuniform.pdf and /dev/null differ diff --git a/_images/image_origin.pdf b/_images/image_origin.pdf deleted file mode 100644 index 571a9fe72d1..00000000000 Binary files a/_images/image_origin.pdf and /dev/null differ diff --git a/_images/image_slices_viewer.pdf b/_images/image_slices_viewer.pdf deleted file mode 100644 index be7eb8ba19a..00000000000 Binary files a/_images/image_slices_viewer.pdf and /dev/null differ diff --git a/_images/image_zcoord.pdf b/_images/image_zcoord.pdf deleted file mode 100644 index 311833edb19..00000000000 Binary files a/_images/image_zcoord.pdf and /dev/null differ diff --git a/_images/inheritance-04a7bc187c56177aa85e730b3e024d8f93fee9bc.png b/_images/inheritance-04a7bc187c56177aa85e730b3e024d8f93fee9bc.png deleted file mode 100644 index 247e2660819..00000000000 Binary files a/_images/inheritance-04a7bc187c56177aa85e730b3e024d8f93fee9bc.png and /dev/null differ diff --git a/_images/inheritance-04fa843dc1fb42eeb49de0a8d65bcc57edba4050.png b/_images/inheritance-04fa843dc1fb42eeb49de0a8d65bcc57edba4050.png deleted file mode 100644 index 9fa7b90b0e9..00000000000 Binary files a/_images/inheritance-04fa843dc1fb42eeb49de0a8d65bcc57edba4050.png and /dev/null differ diff --git a/_images/inheritance-0aab233f6376ae1fd7eb8dd334cad39068fc7e57.png b/_images/inheritance-0aab233f6376ae1fd7eb8dd334cad39068fc7e57.png deleted file mode 100644 index 177ce1fb61c..00000000000 Binary files a/_images/inheritance-0aab233f6376ae1fd7eb8dd334cad39068fc7e57.png and /dev/null differ diff --git a/_images/inheritance-0bba12a6d47840c2a21137536e52987d43d47b71.png b/_images/inheritance-0bba12a6d47840c2a21137536e52987d43d47b71.png deleted file mode 100644 index d9b2ce8fe45..00000000000 Binary files a/_images/inheritance-0bba12a6d47840c2a21137536e52987d43d47b71.png and /dev/null differ diff --git a/_images/inheritance-0dd026c1144026d6423393ef078dd78d53f9e654.png b/_images/inheritance-0dd026c1144026d6423393ef078dd78d53f9e654.png deleted file mode 100644 index e90a2c3b9cc..00000000000 Binary files a/_images/inheritance-0dd026c1144026d6423393ef078dd78d53f9e654.png and /dev/null differ diff --git a/_images/inheritance-11d87c7867160af7bb50eacb309c84ed391d621c.png b/_images/inheritance-11d87c7867160af7bb50eacb309c84ed391d621c.png deleted file mode 100644 index 11e61ad44ad..00000000000 Binary files a/_images/inheritance-11d87c7867160af7bb50eacb309c84ed391d621c.png and /dev/null differ diff --git a/_images/inheritance-121d0d0770e964be7d32f3eaf88dca3c5c0fd187.png b/_images/inheritance-121d0d0770e964be7d32f3eaf88dca3c5c0fd187.png deleted file mode 100644 index 2f3ef5dcd60..00000000000 Binary files a/_images/inheritance-121d0d0770e964be7d32f3eaf88dca3c5c0fd187.png and /dev/null differ diff --git a/_images/inheritance-12afdb6a73d3f92cf30fbdf5dd9ffef7301e3be6.png b/_images/inheritance-12afdb6a73d3f92cf30fbdf5dd9ffef7301e3be6.png deleted file mode 100644 index cbc5063cac0..00000000000 Binary files a/_images/inheritance-12afdb6a73d3f92cf30fbdf5dd9ffef7301e3be6.png and /dev/null differ diff --git a/_images/inheritance-14091e89eeb9d29b1fb5a9949759e5004048bb99.png b/_images/inheritance-14091e89eeb9d29b1fb5a9949759e5004048bb99.png deleted file mode 100644 index 946571947c9..00000000000 Binary files a/_images/inheritance-14091e89eeb9d29b1fb5a9949759e5004048bb99.png and /dev/null differ diff --git a/_images/inheritance-19c1c8b87d7db1ac5ab4d37a62ca1a495809fec3.png b/_images/inheritance-19c1c8b87d7db1ac5ab4d37a62ca1a495809fec3.png deleted file mode 100644 index 11e61ad44ad..00000000000 Binary files a/_images/inheritance-19c1c8b87d7db1ac5ab4d37a62ca1a495809fec3.png and /dev/null differ diff --git a/_images/inheritance-1b5d96fc160c82b1224eeb392afa10343a6543bc.png b/_images/inheritance-1b5d96fc160c82b1224eeb392afa10343a6543bc.png deleted file mode 100644 index 53035c9be17..00000000000 Binary files a/_images/inheritance-1b5d96fc160c82b1224eeb392afa10343a6543bc.png and /dev/null differ diff --git a/_images/inheritance-1bcbee2dcff2499114424025fdd702d5eb4e7cff.png b/_images/inheritance-1bcbee2dcff2499114424025fdd702d5eb4e7cff.png deleted file mode 100644 index 1732bc5334a..00000000000 Binary files a/_images/inheritance-1bcbee2dcff2499114424025fdd702d5eb4e7cff.png and /dev/null differ diff --git a/_images/inheritance-1c60a0de0481b879f5f983974a45cb39d77bb892.png b/_images/inheritance-1c60a0de0481b879f5f983974a45cb39d77bb892.png deleted file mode 100644 index e0d16144bcc..00000000000 Binary files a/_images/inheritance-1c60a0de0481b879f5f983974a45cb39d77bb892.png and /dev/null differ diff --git a/_images/inheritance-1e25ce560109efaf1cc34bef9ef49edae78be09e.png b/_images/inheritance-1e25ce560109efaf1cc34bef9ef49edae78be09e.png deleted file mode 100644 index e2decd9228c..00000000000 Binary files a/_images/inheritance-1e25ce560109efaf1cc34bef9ef49edae78be09e.png and /dev/null differ diff --git a/_images/inheritance-24ea745673746053e594f0582352d714fca63fa5.png b/_images/inheritance-24ea745673746053e594f0582352d714fca63fa5.png deleted file mode 100644 index 2f3ef5dcd60..00000000000 Binary files a/_images/inheritance-24ea745673746053e594f0582352d714fca63fa5.png and /dev/null differ diff --git a/_images/inheritance-32f4ab5129e860828bea470f6edcbfdc1c782650.png b/_images/inheritance-32f4ab5129e860828bea470f6edcbfdc1c782650.png deleted file mode 100644 index 1b99aa27083..00000000000 Binary files a/_images/inheritance-32f4ab5129e860828bea470f6edcbfdc1c782650.png and /dev/null differ diff --git a/_images/inheritance-356a477633a6d11e81cbab96e03a9237613028e4.png b/_images/inheritance-356a477633a6d11e81cbab96e03a9237613028e4.png deleted file mode 100644 index b31f2023ea9..00000000000 Binary files a/_images/inheritance-356a477633a6d11e81cbab96e03a9237613028e4.png and /dev/null differ diff --git a/_images/inheritance-36280c57ab14ad3d0c95a9aa498ded776fdb2e7d.png b/_images/inheritance-36280c57ab14ad3d0c95a9aa498ded776fdb2e7d.png deleted file mode 100644 index 08e7ca0079d..00000000000 Binary files a/_images/inheritance-36280c57ab14ad3d0c95a9aa498ded776fdb2e7d.png and /dev/null differ diff --git a/_images/inheritance-45cc93bda6ecb5fbba89b9388bc68c603b063195.png b/_images/inheritance-45cc93bda6ecb5fbba89b9388bc68c603b063195.png deleted file mode 100644 index 3a98b9c0980..00000000000 Binary files a/_images/inheritance-45cc93bda6ecb5fbba89b9388bc68c603b063195.png and /dev/null differ diff --git a/_images/inheritance-4a1d103c63c6efa557984553a63947577b86b4cf.png b/_images/inheritance-4a1d103c63c6efa557984553a63947577b86b4cf.png deleted file mode 100644 index 2750f04e3ec..00000000000 Binary files a/_images/inheritance-4a1d103c63c6efa557984553a63947577b86b4cf.png and /dev/null differ diff --git a/_images/inheritance-4f0a6a4a331576624d17f48aabf88e39cdf27456.png b/_images/inheritance-4f0a6a4a331576624d17f48aabf88e39cdf27456.png deleted file mode 100644 index 248980ff10b..00000000000 Binary files a/_images/inheritance-4f0a6a4a331576624d17f48aabf88e39cdf27456.png and /dev/null differ diff --git a/_images/inheritance-525d9b63dfa311545c23112adf30ecb4c3fdca62.png b/_images/inheritance-525d9b63dfa311545c23112adf30ecb4c3fdca62.png deleted file mode 100644 index e17450fbe3f..00000000000 Binary files a/_images/inheritance-525d9b63dfa311545c23112adf30ecb4c3fdca62.png and /dev/null differ diff --git a/_images/inheritance-555840d1ff9d99dd05895ef28ef479a6f10cd233.png b/_images/inheritance-555840d1ff9d99dd05895ef28ef479a6f10cd233.png deleted file mode 100644 index 74726c1c974..00000000000 Binary files a/_images/inheritance-555840d1ff9d99dd05895ef28ef479a6f10cd233.png and /dev/null differ diff --git a/_images/inheritance-585ac31fdbe08d0466edb87032e976f0092a8dfd.png b/_images/inheritance-585ac31fdbe08d0466edb87032e976f0092a8dfd.png deleted file mode 100644 index 01950465f6c..00000000000 Binary files a/_images/inheritance-585ac31fdbe08d0466edb87032e976f0092a8dfd.png and /dev/null differ diff --git a/_images/inheritance-5cd02ddb2321eb8f5fe755ae54c5df198817e2b8.png b/_images/inheritance-5cd02ddb2321eb8f5fe755ae54c5df198817e2b8.png deleted file mode 100644 index 70885faefdc..00000000000 Binary files a/_images/inheritance-5cd02ddb2321eb8f5fe755ae54c5df198817e2b8.png and /dev/null differ diff --git a/_images/inheritance-639f7cefc25bc36022831c739c7da34f24ad0eb4.png b/_images/inheritance-639f7cefc25bc36022831c739c7da34f24ad0eb4.png deleted file mode 100644 index 928bb0ae75c..00000000000 Binary files a/_images/inheritance-639f7cefc25bc36022831c739c7da34f24ad0eb4.png and /dev/null differ diff --git a/_images/inheritance-6639f4ea5b75961e036da161fa76642cec850104.png b/_images/inheritance-6639f4ea5b75961e036da161fa76642cec850104.png deleted file mode 100644 index 943a8aa03e9..00000000000 Binary files a/_images/inheritance-6639f4ea5b75961e036da161fa76642cec850104.png and /dev/null differ diff --git a/_images/inheritance-66ceb1013c2b376b7d4aef9c3264ae0bc817f733.png b/_images/inheritance-66ceb1013c2b376b7d4aef9c3264ae0bc817f733.png deleted file mode 100644 index db4f4808fde..00000000000 Binary files a/_images/inheritance-66ceb1013c2b376b7d4aef9c3264ae0bc817f733.png and /dev/null differ diff --git a/_images/inheritance-6c57e0ba625c49d88d074e0b122ae13c4fdbd39f.png b/_images/inheritance-6c57e0ba625c49d88d074e0b122ae13c4fdbd39f.png deleted file mode 100644 index fd08702b3f3..00000000000 Binary files a/_images/inheritance-6c57e0ba625c49d88d074e0b122ae13c4fdbd39f.png and /dev/null differ diff --git a/_images/inheritance-7666314753fcece6535fd9825d6520ee1a4ede23.png b/_images/inheritance-7666314753fcece6535fd9825d6520ee1a4ede23.png deleted file mode 100644 index 7532b357bae..00000000000 Binary files a/_images/inheritance-7666314753fcece6535fd9825d6520ee1a4ede23.png and /dev/null differ diff --git a/_images/inheritance-7f6f6fc6796980c33319ae1386b797fce65d429b.png b/_images/inheritance-7f6f6fc6796980c33319ae1386b797fce65d429b.png deleted file mode 100644 index ea2aa04dca3..00000000000 Binary files a/_images/inheritance-7f6f6fc6796980c33319ae1386b797fce65d429b.png and /dev/null differ diff --git a/_images/inheritance-8042707ae7819d7b8c8dc461757179d8becd24f7.png b/_images/inheritance-8042707ae7819d7b8c8dc461757179d8becd24f7.png deleted file mode 100644 index 6615f2a5222..00000000000 Binary files a/_images/inheritance-8042707ae7819d7b8c8dc461757179d8becd24f7.png and /dev/null differ diff --git a/_images/inheritance-82ca14f4c74ab2c5a7f83ef0ebe433dda504f93b.png b/_images/inheritance-82ca14f4c74ab2c5a7f83ef0ebe433dda504f93b.png deleted file mode 100644 index c291101426f..00000000000 Binary files a/_images/inheritance-82ca14f4c74ab2c5a7f83ef0ebe433dda504f93b.png and /dev/null differ diff --git a/_images/inheritance-8d5d47582191f65f1861a6c1b5a58beebb7978d9.png b/_images/inheritance-8d5d47582191f65f1861a6c1b5a58beebb7978d9.png deleted file mode 100644 index 0a426afffb6..00000000000 Binary files a/_images/inheritance-8d5d47582191f65f1861a6c1b5a58beebb7978d9.png and /dev/null differ diff --git a/_images/inheritance-9071f76e2e324e03f7fa509c297723b2aeb844a4.png b/_images/inheritance-9071f76e2e324e03f7fa509c297723b2aeb844a4.png deleted file mode 100644 index e46d2a83ffe..00000000000 Binary files a/_images/inheritance-9071f76e2e324e03f7fa509c297723b2aeb844a4.png and /dev/null differ diff --git a/_images/inheritance-90db532c7722fba7644cbe4cedbf78f6fde569cb.png b/_images/inheritance-90db532c7722fba7644cbe4cedbf78f6fde569cb.png deleted file mode 100644 index e46d2a83ffe..00000000000 Binary files a/_images/inheritance-90db532c7722fba7644cbe4cedbf78f6fde569cb.png and /dev/null differ diff --git a/_images/inheritance-914b8eb5698aba732ca580dd20fcb540093b13f5.png b/_images/inheritance-914b8eb5698aba732ca580dd20fcb540093b13f5.png deleted file mode 100644 index c65e9e1cb8c..00000000000 Binary files a/_images/inheritance-914b8eb5698aba732ca580dd20fcb540093b13f5.png and /dev/null differ diff --git a/_images/inheritance-939659f5f6143728aa33f1c6297877dfdbff8115.png b/_images/inheritance-939659f5f6143728aa33f1c6297877dfdbff8115.png deleted file mode 100644 index d9b2ce8fe45..00000000000 Binary files a/_images/inheritance-939659f5f6143728aa33f1c6297877dfdbff8115.png and /dev/null differ diff --git a/_images/inheritance-9bcd0ee69d08b17d94b7f1a20a77887d6b6bd31a.png b/_images/inheritance-9bcd0ee69d08b17d94b7f1a20a77887d6b6bd31a.png deleted file mode 100644 index 928bb0ae75c..00000000000 Binary files a/_images/inheritance-9bcd0ee69d08b17d94b7f1a20a77887d6b6bd31a.png and /dev/null differ diff --git a/_images/inheritance-a25ef043bbac8b270c2cff3f2e06ac4a7831f29b.png b/_images/inheritance-a25ef043bbac8b270c2cff3f2e06ac4a7831f29b.png deleted file mode 100644 index a7dd9decf6f..00000000000 Binary files a/_images/inheritance-a25ef043bbac8b270c2cff3f2e06ac4a7831f29b.png and /dev/null differ diff --git a/_images/inheritance-a37f322ce47b248eced3b66bbc587ff3603d7081.png b/_images/inheritance-a37f322ce47b248eced3b66bbc587ff3603d7081.png deleted file mode 100644 index e246e884dfb..00000000000 Binary files a/_images/inheritance-a37f322ce47b248eced3b66bbc587ff3603d7081.png and /dev/null differ diff --git a/_images/inheritance-a4aa8ab49b68ece79f58b10a6602b1ac10939c50.png b/_images/inheritance-a4aa8ab49b68ece79f58b10a6602b1ac10939c50.png deleted file mode 100644 index 52a2f9b6fa4..00000000000 Binary files a/_images/inheritance-a4aa8ab49b68ece79f58b10a6602b1ac10939c50.png and /dev/null differ diff --git a/_images/inheritance-a577e92d660d6a21130fd7c8d1319079dd2b2abe.png b/_images/inheritance-a577e92d660d6a21130fd7c8d1319079dd2b2abe.png deleted file mode 100644 index 8e35c3ef709..00000000000 Binary files a/_images/inheritance-a577e92d660d6a21130fd7c8d1319079dd2b2abe.png and /dev/null differ diff --git a/_images/inheritance-a70bb26e5408661b7d79cf916ee18b28c30d3935.png b/_images/inheritance-a70bb26e5408661b7d79cf916ee18b28c30d3935.png deleted file mode 100644 index 6f5c5fb2944..00000000000 Binary files a/_images/inheritance-a70bb26e5408661b7d79cf916ee18b28c30d3935.png and /dev/null differ diff --git a/_images/inheritance-a9dd6db4beb7f7630c2d15e70725236a040d12a4.png b/_images/inheritance-a9dd6db4beb7f7630c2d15e70725236a040d12a4.png deleted file mode 100644 index 7532b357bae..00000000000 Binary files a/_images/inheritance-a9dd6db4beb7f7630c2d15e70725236a040d12a4.png and /dev/null differ diff --git a/_images/inheritance-acc8a3716180b925f8f8309a7afcd2f7ee25d11d.png b/_images/inheritance-acc8a3716180b925f8f8309a7afcd2f7ee25d11d.png deleted file mode 100644 index bf91c06167f..00000000000 Binary files a/_images/inheritance-acc8a3716180b925f8f8309a7afcd2f7ee25d11d.png and /dev/null differ diff --git a/_images/inheritance-b365fa1a97013eaa0b80b4c0ed41bf9255b96b6e.png b/_images/inheritance-b365fa1a97013eaa0b80b4c0ed41bf9255b96b6e.png deleted file mode 100644 index a0e4662c067..00000000000 Binary files a/_images/inheritance-b365fa1a97013eaa0b80b4c0ed41bf9255b96b6e.png and /dev/null differ diff --git a/_images/inheritance-b5bfa9c3778dbb0d27c688be914e167fa60b296b.png b/_images/inheritance-b5bfa9c3778dbb0d27c688be914e167fa60b296b.png deleted file mode 100644 index 985aeae3911..00000000000 Binary files a/_images/inheritance-b5bfa9c3778dbb0d27c688be914e167fa60b296b.png and /dev/null differ diff --git a/_images/inheritance-b6eee7a893b271d713d5d6b6c225cd2cf2763afd.png b/_images/inheritance-b6eee7a893b271d713d5d6b6c225cd2cf2763afd.png deleted file mode 100644 index da13a6a2a94..00000000000 Binary files a/_images/inheritance-b6eee7a893b271d713d5d6b6c225cd2cf2763afd.png and /dev/null differ diff --git a/_images/inheritance-bca83c07643294e8dfd25f65b273edbd8de3f27a.png b/_images/inheritance-bca83c07643294e8dfd25f65b273edbd8de3f27a.png deleted file mode 100644 index db1550249a8..00000000000 Binary files a/_images/inheritance-bca83c07643294e8dfd25f65b273edbd8de3f27a.png and /dev/null differ diff --git a/_images/inheritance-bcace63751c23250737abb0146bc3d2c17c59b48.png b/_images/inheritance-bcace63751c23250737abb0146bc3d2c17c59b48.png deleted file mode 100644 index 2750f04e3ec..00000000000 Binary files a/_images/inheritance-bcace63751c23250737abb0146bc3d2c17c59b48.png and /dev/null differ diff --git a/_images/inheritance-c162709d3eabb3908f68a386d045bf28e01e7153.png b/_images/inheritance-c162709d3eabb3908f68a386d045bf28e01e7153.png deleted file mode 100644 index dfaa6be32f4..00000000000 Binary files a/_images/inheritance-c162709d3eabb3908f68a386d045bf28e01e7153.png and /dev/null differ diff --git a/_images/inheritance-c9f3915294082ed85071026684b1087c7eca0a29.png b/_images/inheritance-c9f3915294082ed85071026684b1087c7eca0a29.png deleted file mode 100644 index fd08702b3f3..00000000000 Binary files a/_images/inheritance-c9f3915294082ed85071026684b1087c7eca0a29.png and /dev/null differ diff --git a/_images/inheritance-caf6f1588ed95f839d3efed420cd9103f5725fa4.png b/_images/inheritance-caf6f1588ed95f839d3efed420cd9103f5725fa4.png deleted file mode 100644 index 8dc8d8e358b..00000000000 Binary files a/_images/inheritance-caf6f1588ed95f839d3efed420cd9103f5725fa4.png and /dev/null differ diff --git a/_images/inheritance-cb871e8d331c4f86589f6c6d48076123d386650c.png b/_images/inheritance-cb871e8d331c4f86589f6c6d48076123d386650c.png deleted file mode 100644 index 916559c33ec..00000000000 Binary files a/_images/inheritance-cb871e8d331c4f86589f6c6d48076123d386650c.png and /dev/null differ diff --git a/_images/inheritance-ce21b2add90674899520aae7ead8d21bde9078ad.png b/_images/inheritance-ce21b2add90674899520aae7ead8d21bde9078ad.png deleted file mode 100644 index 2117206e8fa..00000000000 Binary files a/_images/inheritance-ce21b2add90674899520aae7ead8d21bde9078ad.png and /dev/null differ diff --git a/_images/inheritance-ceb109022ab98927d545266444778daf28fe957d.png b/_images/inheritance-ceb109022ab98927d545266444778daf28fe957d.png deleted file mode 100644 index 3a98b9c0980..00000000000 Binary files a/_images/inheritance-ceb109022ab98927d545266444778daf28fe957d.png and /dev/null differ diff --git a/_images/inheritance-d6435e3fe97332fa73a9db603a96d13582bfbe7b.png b/_images/inheritance-d6435e3fe97332fa73a9db603a96d13582bfbe7b.png deleted file mode 100644 index c3b6812c350..00000000000 Binary files a/_images/inheritance-d6435e3fe97332fa73a9db603a96d13582bfbe7b.png and /dev/null differ diff --git a/_images/inheritance-d647f8de86062d198950c7c17dcb9cac30cd1198.png b/_images/inheritance-d647f8de86062d198950c7c17dcb9cac30cd1198.png deleted file mode 100644 index 74bb6ae196f..00000000000 Binary files a/_images/inheritance-d647f8de86062d198950c7c17dcb9cac30cd1198.png and /dev/null differ diff --git a/_images/inheritance-d8307364e6b47c3b337902b8ea96a9cf334d1908.png b/_images/inheritance-d8307364e6b47c3b337902b8ea96a9cf334d1908.png deleted file mode 100644 index db709d85779..00000000000 Binary files a/_images/inheritance-d8307364e6b47c3b337902b8ea96a9cf334d1908.png and /dev/null differ diff --git a/_images/inheritance-d83193a20352f7cb8633db94df23637e929c7b33.png b/_images/inheritance-d83193a20352f7cb8633db94df23637e929c7b33.png deleted file mode 100644 index 3fec9b35742..00000000000 Binary files a/_images/inheritance-d83193a20352f7cb8633db94df23637e929c7b33.png and /dev/null differ diff --git a/_images/inheritance-d87fbb11470f581c3d457ba804afbc3ea464a4b0.png b/_images/inheritance-d87fbb11470f581c3d457ba804afbc3ea464a4b0.png deleted file mode 100644 index ba83408fcaf..00000000000 Binary files a/_images/inheritance-d87fbb11470f581c3d457ba804afbc3ea464a4b0.png and /dev/null differ diff --git a/_images/inheritance-de26b93b1463c15b86c95f57297eac49232a3a78.png b/_images/inheritance-de26b93b1463c15b86c95f57297eac49232a3a78.png deleted file mode 100644 index e2decd9228c..00000000000 Binary files a/_images/inheritance-de26b93b1463c15b86c95f57297eac49232a3a78.png and /dev/null differ diff --git a/_images/inheritance-dfb2be366ca6137a84fd2ced14307e078c7218e0.png b/_images/inheritance-dfb2be366ca6137a84fd2ced14307e078c7218e0.png deleted file mode 100644 index 763d41d5ee5..00000000000 Binary files a/_images/inheritance-dfb2be366ca6137a84fd2ced14307e078c7218e0.png and /dev/null differ diff --git a/_images/inheritance-e7afe87d71a02366aa7a59ea325b39c2e3e651a6.png b/_images/inheritance-e7afe87d71a02366aa7a59ea325b39c2e3e651a6.png deleted file mode 100644 index cf34cfb2bbf..00000000000 Binary files a/_images/inheritance-e7afe87d71a02366aa7a59ea325b39c2e3e651a6.png and /dev/null differ diff --git a/_images/inheritance-e8e0230291bdd42e0775e62fe1dd367f0407fe9b.png b/_images/inheritance-e8e0230291bdd42e0775e62fe1dd367f0407fe9b.png deleted file mode 100644 index fe566c84b3d..00000000000 Binary files a/_images/inheritance-e8e0230291bdd42e0775e62fe1dd367f0407fe9b.png and /dev/null differ diff --git a/_images/inheritance-f22cd273fa075a758d371ed91dbe67968c7a3830.png b/_images/inheritance-f22cd273fa075a758d371ed91dbe67968c7a3830.png deleted file mode 100644 index e17450fbe3f..00000000000 Binary files a/_images/inheritance-f22cd273fa075a758d371ed91dbe67968c7a3830.png and /dev/null differ diff --git a/_images/inheritance-f27bb672406456c304cf920e9bfcfdc61bc1186b.png b/_images/inheritance-f27bb672406456c304cf920e9bfcfdc61bc1186b.png deleted file mode 100644 index 47cb7db2ee8..00000000000 Binary files a/_images/inheritance-f27bb672406456c304cf920e9bfcfdc61bc1186b.png and /dev/null differ diff --git a/_images/inheritance-f3a170ecaa709d7ba4072b9940e1a70fc5ebb81c.png b/_images/inheritance-f3a170ecaa709d7ba4072b9940e1a70fc5ebb81c.png deleted file mode 100644 index 1a56059fe97..00000000000 Binary files a/_images/inheritance-f3a170ecaa709d7ba4072b9940e1a70fc5ebb81c.png and /dev/null differ diff --git a/_images/inheritance-f3bf52670160da3f5d4bf6512af163a70f5606a8.png b/_images/inheritance-f3bf52670160da3f5d4bf6512af163a70f5606a8.png deleted file mode 100644 index c52f3409f14..00000000000 Binary files a/_images/inheritance-f3bf52670160da3f5d4bf6512af163a70f5606a8.png and /dev/null differ diff --git a/_images/inheritance-fe49ab567d778d17523afe8f2301bc6432d62935.png b/_images/inheritance-fe49ab567d778d17523afe8f2301bc6432d62935.png deleted file mode 100644 index 23036937405..00000000000 Binary files a/_images/inheritance-fe49ab567d778d17523afe8f2301bc6432d62935.png and /dev/null differ diff --git a/_images/inheritance0ca9968ee0.png b/_images/inheritance0ca9968ee0.png deleted file mode 100644 index 6337f213391..00000000000 Binary files a/_images/inheritance0ca9968ee0.png and /dev/null differ diff --git a/_images/inheritance1bda3e63b5.png b/_images/inheritance1bda3e63b5.png deleted file mode 100644 index 9101e44fc17..00000000000 Binary files a/_images/inheritance1bda3e63b5.png and /dev/null differ diff --git a/_images/inheritance47732b7b79.png b/_images/inheritance47732b7b79.png deleted file mode 100644 index fd163b96623..00000000000 Binary files a/_images/inheritance47732b7b79.png and /dev/null differ diff --git a/_images/inheritance829eaf436e.png b/_images/inheritance829eaf436e.png deleted file mode 100644 index e820ce20891..00000000000 Binary files a/_images/inheritance829eaf436e.png and /dev/null differ diff --git a/_images/inheritancecbc02086c0.png b/_images/inheritancecbc02086c0.png deleted file mode 100644 index 01d95cd5002..00000000000 Binary files a/_images/inheritancecbc02086c0.png and /dev/null differ diff --git a/_images/inset_locator_demo.pdf b/_images/inset_locator_demo.pdf deleted file mode 100644 index 7ed16cc8232..00000000000 Binary files a/_images/inset_locator_demo.pdf and /dev/null differ diff --git a/_images/inset_locator_demo1.pdf b/_images/inset_locator_demo1.pdf deleted file mode 100644 index 2c920ee58ea..00000000000 Binary files a/_images/inset_locator_demo1.pdf and /dev/null differ diff --git a/_images/inset_locator_demo2.pdf b/_images/inset_locator_demo2.pdf deleted file mode 100644 index 23601cc81f6..00000000000 Binary files a/_images/inset_locator_demo2.pdf and /dev/null differ diff --git a/_images/inset_locator_demo21.pdf b/_images/inset_locator_demo21.pdf deleted file mode 100644 index c43c2987c5b..00000000000 Binary files a/_images/inset_locator_demo21.pdf and /dev/null differ diff --git a/_images/integral_demo.pdf b/_images/integral_demo.pdf deleted file mode 100644 index bcc2a530a26..00000000000 Binary files a/_images/integral_demo.pdf and /dev/null differ diff --git a/_images/interp_demo.pdf b/_images/interp_demo.pdf deleted file mode 100644 index 998ff23114d..00000000000 Binary files a/_images/interp_demo.pdf and /dev/null differ diff --git a/_images/invert_axes.pdf b/_images/invert_axes.pdf deleted file mode 100644 index 2d5c9771222..00000000000 Binary files a/_images/invert_axes.pdf and /dev/null differ diff --git a/_images/joinstyle.pdf b/_images/joinstyle.pdf deleted file mode 100644 index 827d52f491d..00000000000 Binary files a/_images/joinstyle.pdf and /dev/null differ diff --git a/_images/layer_images.pdf b/_images/layer_images.pdf deleted file mode 100644 index 795b0df1f0c..00000000000 Binary files a/_images/layer_images.pdf and /dev/null differ diff --git a/_images/legend_auto_00.png b/_images/legend_auto_00.png deleted file mode 100644 index 97b691d7c3c..00000000000 Binary files a/_images/legend_auto_00.png and /dev/null differ diff --git a/_images/legend_auto_01.png b/_images/legend_auto_01.png deleted file mode 100644 index 87da3ffb618..00000000000 Binary files a/_images/legend_auto_01.png and /dev/null differ diff --git a/_images/legend_auto_02.png b/_images/legend_auto_02.png deleted file mode 100644 index 775fb108ada..00000000000 Binary files a/_images/legend_auto_02.png and /dev/null differ diff --git a/_images/legend_auto_03.png b/_images/legend_auto_03.png deleted file mode 100644 index be440f0f12c..00000000000 Binary files a/_images/legend_auto_03.png and /dev/null differ diff --git a/_images/legend_auto_04.png b/_images/legend_auto_04.png deleted file mode 100644 index a7466fa609d..00000000000 Binary files a/_images/legend_auto_04.png and /dev/null differ diff --git a/_images/legend_auto_05.png b/_images/legend_auto_05.png deleted file mode 100644 index 4c77710d340..00000000000 Binary files a/_images/legend_auto_05.png and /dev/null differ diff --git a/_images/legend_auto_06.png b/_images/legend_auto_06.png deleted file mode 100644 index 2aaecd9aaf5..00000000000 Binary files a/_images/legend_auto_06.png and /dev/null differ diff --git a/_images/legend_auto_07.png b/_images/legend_auto_07.png deleted file mode 100644 index bf5cc55936a..00000000000 Binary files a/_images/legend_auto_07.png and /dev/null differ diff --git a/_images/legend_auto_08.png b/_images/legend_auto_08.png deleted file mode 100644 index 146c9d05dd1..00000000000 Binary files a/_images/legend_auto_08.png and /dev/null differ diff --git a/_images/legend_auto_09.png b/_images/legend_auto_09.png deleted file mode 100644 index 23a00bfcf92..00000000000 Binary files a/_images/legend_auto_09.png and /dev/null differ diff --git a/_images/legend_demo.pdf b/_images/legend_demo.pdf deleted file mode 100644 index 59f7757dac7..00000000000 Binary files a/_images/legend_demo.pdf and /dev/null differ diff --git a/_images/legend_demo1.pdf b/_images/legend_demo1.pdf deleted file mode 100644 index d95e55e8f7d..00000000000 Binary files a/_images/legend_demo1.pdf and /dev/null differ diff --git a/_images/legend_demo2.pdf b/_images/legend_demo2.pdf deleted file mode 100644 index 4142c413401..00000000000 Binary files a/_images/legend_demo2.pdf and /dev/null differ diff --git a/_images/legend_demo21.png b/_images/legend_demo21.png deleted file mode 100644 index 20d7b16c935..00000000000 Binary files a/_images/legend_demo21.png and /dev/null differ diff --git a/_images/legend_demo3.pdf b/_images/legend_demo3.pdf deleted file mode 100644 index f74550a8e26..00000000000 Binary files a/_images/legend_demo3.pdf and /dev/null differ diff --git a/_images/legend_demo_custom_handler.png b/_images/legend_demo_custom_handler.png deleted file mode 100644 index 1f55298a45a..00000000000 Binary files a/_images/legend_demo_custom_handler.png and /dev/null differ diff --git a/_images/legend_scatter.pdf b/_images/legend_scatter.pdf deleted file mode 100644 index 8cdcf5360af..00000000000 Binary files a/_images/legend_scatter.pdf and /dev/null differ diff --git a/_images/legend_scatter.png b/_images/legend_scatter.png deleted file mode 100644 index 85086495cb1..00000000000 Binary files a/_images/legend_scatter.png and /dev/null differ diff --git a/_images/legend_translucent.pdf b/_images/legend_translucent.pdf deleted file mode 100644 index 25fcdaf45af..00000000000 Binary files a/_images/legend_translucent.pdf and /dev/null differ diff --git a/_images/legend_translucent.png b/_images/legend_translucent.png deleted file mode 100644 index fa96e1afe96..00000000000 Binary files a/_images/legend_translucent.png and /dev/null differ diff --git a/_images/line_collection.pdf b/_images/line_collection.pdf deleted file mode 100644 index b4c91be2d27..00000000000 Binary files a/_images/line_collection.pdf and /dev/null differ diff --git a/_images/line_collection2.pdf b/_images/line_collection2.pdf deleted file mode 100644 index 8843fd34c16..00000000000 Binary files a/_images/line_collection2.pdf and /dev/null differ diff --git a/_images/line_styles.pdf b/_images/line_styles.pdf deleted file mode 100644 index cdc0586855f..00000000000 Binary files a/_images/line_styles.pdf and /dev/null differ diff --git a/_images/line_styles.png b/_images/line_styles.png deleted file mode 100644 index ae3e39015c7..00000000000 Binary files a/_images/line_styles.png and /dev/null differ diff --git a/_images/line_with_text.pdf b/_images/line_with_text.pdf deleted file mode 100644 index 5692de4738e..00000000000 Binary files a/_images/line_with_text.pdf and /dev/null differ diff --git a/_images/lines3d_demo.pdf b/_images/lines3d_demo.pdf deleted file mode 100644 index 7a8f8ac571c..00000000000 Binary files a/_images/lines3d_demo.pdf and /dev/null differ diff --git a/_images/load_converter.pdf b/_images/load_converter.pdf deleted file mode 100644 index b7205ff4bad..00000000000 Binary files a/_images/load_converter.pdf and /dev/null differ diff --git a/_images/loadrec.pdf b/_images/loadrec.pdf deleted file mode 100644 index 3f18f585f5a..00000000000 Binary files a/_images/loadrec.pdf and /dev/null differ diff --git a/_images/log_bar.pdf b/_images/log_bar.pdf deleted file mode 100644 index 67a5032e8b2..00000000000 Binary files a/_images/log_bar.pdf and /dev/null differ diff --git a/_images/log_demo.pdf b/_images/log_demo.pdf deleted file mode 100644 index ca545ec9d94..00000000000 Binary files a/_images/log_demo.pdf and /dev/null differ diff --git a/_images/log_test.pdf b/_images/log_test.pdf deleted file mode 100644 index 5df7320f24f..00000000000 Binary files a/_images/log_test.pdf and /dev/null differ diff --git a/_images/logo.pdf b/_images/logo.pdf deleted file mode 100644 index a34ae082945..00000000000 Binary files a/_images/logo.pdf and /dev/null differ diff --git a/_images/logo2.pdf b/_images/logo2.pdf deleted file mode 100644 index 5f779740906..00000000000 Binary files a/_images/logo2.pdf and /dev/null differ diff --git a/_images/major_minor_demo1.pdf b/_images/major_minor_demo1.pdf deleted file mode 100644 index 26a769af8b5..00000000000 Binary files a/_images/major_minor_demo1.pdf and /dev/null differ diff --git a/_images/major_minor_demo2.pdf b/_images/major_minor_demo2.pdf deleted file mode 100644 index 944866fd182..00000000000 Binary files a/_images/major_minor_demo2.pdf and /dev/null differ diff --git a/_images/manual_axis.pdf b/_images/manual_axis.pdf deleted file mode 100644 index 69d2ba0c184..00000000000 Binary files a/_images/manual_axis.pdf and /dev/null differ diff --git a/_images/masked_demo.pdf b/_images/masked_demo.pdf deleted file mode 100644 index 95a1c4cbd51..00000000000 Binary files a/_images/masked_demo.pdf and /dev/null differ diff --git a/_images/mathmpl/math-5c77f15b40.png b/_images/mathmpl/math-5c77f15b40.png deleted file mode 100644 index f35f7210399..00000000000 Binary files a/_images/mathmpl/math-5c77f15b40.png and /dev/null differ diff --git a/_images/mathmpl/math-bf0042a83f.png b/_images/mathmpl/math-bf0042a83f.png deleted file mode 100644 index 32aade9b9df..00000000000 Binary files a/_images/mathmpl/math-bf0042a83f.png and /dev/null differ diff --git a/_images/mathmpl/math-e2adf498a2.png b/_images/mathmpl/math-e2adf498a2.png deleted file mode 100644 index bfc63121e4c..00000000000 Binary files a/_images/mathmpl/math-e2adf498a2.png and /dev/null differ diff --git a/_images/mathtext_asarray.pdf b/_images/mathtext_asarray.pdf deleted file mode 100644 index 67487785f52..00000000000 Binary files a/_images/mathtext_asarray.pdf and /dev/null differ diff --git a/_images/mathtext_demo.pdf b/_images/mathtext_demo.pdf deleted file mode 100644 index 057174aff3f..00000000000 Binary files a/_images/mathtext_demo.pdf and /dev/null differ diff --git a/_images/mathtext_examples.pdf b/_images/mathtext_examples.pdf deleted file mode 100644 index 11ad88b4398..00000000000 Binary files a/_images/mathtext_examples.pdf and /dev/null differ diff --git a/_images/mathtext_examples.png b/_images/mathtext_examples.png deleted file mode 100644 index 024d61f12d4..00000000000 Binary files a/_images/mathtext_examples.png and /dev/null differ diff --git a/_images/mathtext_examples1.png b/_images/mathtext_examples1.png deleted file mode 100644 index 024d61f12d4..00000000000 Binary files a/_images/mathtext_examples1.png and /dev/null differ diff --git a/_images/matplotlib_icon.pdf b/_images/matplotlib_icon.pdf deleted file mode 100644 index fb0583dfaeb..00000000000 Binary files a/_images/matplotlib_icon.pdf and /dev/null differ diff --git a/_images/matshow_00.pdf b/_images/matshow_00.pdf deleted file mode 100644 index e5e0503c6ca..00000000000 Binary files a/_images/matshow_00.pdf and /dev/null differ diff --git a/_images/matshow_01.pdf b/_images/matshow_01.pdf deleted file mode 100644 index 93748c79bc7..00000000000 Binary files a/_images/matshow_01.pdf and /dev/null differ diff --git a/_images/matshow_02.pdf b/_images/matshow_02.pdf deleted file mode 100644 index 4bd796cd6fd..00000000000 Binary files a/_images/matshow_02.pdf and /dev/null differ diff --git a/_images/matshow_03.pdf b/_images/matshow_03.pdf deleted file mode 100644 index 1627bda1d02..00000000000 Binary files a/_images/matshow_03.pdf and /dev/null differ diff --git a/_images/matshow_03.png b/_images/matshow_03.png deleted file mode 100644 index 63e2578f1a0..00000000000 Binary files a/_images/matshow_03.png and /dev/null differ diff --git a/_images/matshow_04.pdf b/_images/matshow_04.pdf deleted file mode 100644 index d606c8a2c8e..00000000000 Binary files a/_images/matshow_04.pdf and /dev/null differ diff --git a/_images/matshow_04.png b/_images/matshow_04.png deleted file mode 100644 index b5e11b49c7c..00000000000 Binary files a/_images/matshow_04.png and /dev/null differ diff --git a/_images/mixed_subplots_demo.pdf b/_images/mixed_subplots_demo.pdf deleted file mode 100644 index 44cf859b6ee..00000000000 Binary files a/_images/mixed_subplots_demo.pdf and /dev/null differ diff --git a/_images/mri_demo.pdf b/_images/mri_demo.pdf deleted file mode 100644 index 0f51a1f880f..00000000000 Binary files a/_images/mri_demo.pdf and /dev/null differ diff --git a/_images/mri_with_eeg.pdf b/_images/mri_with_eeg.pdf deleted file mode 100644 index 092c7530303..00000000000 Binary files a/_images/mri_with_eeg.pdf and /dev/null differ diff --git a/_images/multi_image.pdf b/_images/multi_image.pdf deleted file mode 100644 index 59bf6015390..00000000000 Binary files a/_images/multi_image.pdf and /dev/null differ diff --git a/_images/multicolored_line_00.pdf b/_images/multicolored_line_00.pdf deleted file mode 100644 index 05e651984aa..00000000000 Binary files a/_images/multicolored_line_00.pdf and /dev/null differ diff --git a/_images/multicolored_line_01.pdf b/_images/multicolored_line_01.pdf deleted file mode 100644 index e2bdfb98a36..00000000000 Binary files a/_images/multicolored_line_01.pdf and /dev/null differ diff --git a/_images/multiline.pdf b/_images/multiline.pdf deleted file mode 100644 index 60a1cbffca8..00000000000 Binary files a/_images/multiline.pdf and /dev/null differ diff --git a/_images/multiple_figs_demo_00.pdf b/_images/multiple_figs_demo_00.pdf deleted file mode 100644 index 773fd07da07..00000000000 Binary files a/_images/multiple_figs_demo_00.pdf and /dev/null differ diff --git a/_images/multiple_figs_demo_01.pdf b/_images/multiple_figs_demo_01.pdf deleted file mode 100644 index 9317ddb4c4b..00000000000 Binary files a/_images/multiple_figs_demo_01.pdf and /dev/null differ diff --git a/_images/multiple_yaxis_with_spines.pdf b/_images/multiple_yaxis_with_spines.pdf deleted file mode 100644 index 6f27dfbff51..00000000000 Binary files a/_images/multiple_yaxis_with_spines.pdf and /dev/null differ diff --git a/_images/nan_test.pdf b/_images/nan_test.pdf deleted file mode 100644 index 4894a1ff73c..00000000000 Binary files a/_images/nan_test.pdf and /dev/null differ diff --git a/_images/newscalarformatter_demo_00.pdf b/_images/newscalarformatter_demo_00.pdf deleted file mode 100644 index 5abc05f8149..00000000000 Binary files a/_images/newscalarformatter_demo_00.pdf and /dev/null differ diff --git a/_images/newscalarformatter_demo_01.pdf b/_images/newscalarformatter_demo_01.pdf deleted file mode 100644 index cf4b36dffa7..00000000000 Binary files a/_images/newscalarformatter_demo_01.pdf and /dev/null differ diff --git a/_images/newscalarformatter_demo_02.pdf b/_images/newscalarformatter_demo_02.pdf deleted file mode 100644 index e4ba7cb434f..00000000000 Binary files a/_images/newscalarformatter_demo_02.pdf and /dev/null differ diff --git a/_images/newscalarformatter_demo_03.pdf b/_images/newscalarformatter_demo_03.pdf deleted file mode 100644 index c998c336038..00000000000 Binary files a/_images/newscalarformatter_demo_03.pdf and /dev/null differ diff --git a/_images/parasite_simple.pdf b/_images/parasite_simple.pdf deleted file mode 100644 index faaf9fb0a21..00000000000 Binary files a/_images/parasite_simple.pdf and /dev/null differ diff --git a/_images/parasite_simple2.pdf b/_images/parasite_simple2.pdf deleted file mode 100644 index 9ff7bee6050..00000000000 Binary files a/_images/parasite_simple2.pdf and /dev/null differ diff --git a/_images/parasite_simple21.pdf b/_images/parasite_simple21.pdf deleted file mode 100644 index 7eb967032da..00000000000 Binary files a/_images/parasite_simple21.pdf and /dev/null differ diff --git a/_images/patch_collection.pdf b/_images/patch_collection.pdf deleted file mode 100644 index 39f53a43d22..00000000000 Binary files a/_images/patch_collection.pdf and /dev/null differ diff --git a/_images/path_patch_demo.pdf b/_images/path_patch_demo.pdf deleted file mode 100644 index ba248c83db8..00000000000 Binary files a/_images/path_patch_demo.pdf and /dev/null differ diff --git a/_images/patheffect_demo.pdf b/_images/patheffect_demo.pdf deleted file mode 100644 index 796c83e8150..00000000000 Binary files a/_images/patheffect_demo.pdf and /dev/null differ diff --git a/_images/pathpatch3d_demo.pdf b/_images/pathpatch3d_demo.pdf deleted file mode 100644 index de414151790..00000000000 Binary files a/_images/pathpatch3d_demo.pdf and /dev/null differ diff --git a/_images/pcolor_demo.pdf b/_images/pcolor_demo.pdf deleted file mode 100644 index e8dfdbe0f0a..00000000000 Binary files a/_images/pcolor_demo.pdf and /dev/null differ diff --git a/_images/pcolor_demo2.pdf b/_images/pcolor_demo2.pdf deleted file mode 100644 index c0ffa7193e6..00000000000 Binary files a/_images/pcolor_demo2.pdf and /dev/null differ diff --git a/_images/pcolor_demo2.png b/_images/pcolor_demo2.png deleted file mode 100644 index 10ec4942c26..00000000000 Binary files a/_images/pcolor_demo2.png and /dev/null differ diff --git a/_images/pcolor_log.pdf b/_images/pcolor_log.pdf deleted file mode 100644 index dbf4f600b15..00000000000 Binary files a/_images/pcolor_log.pdf and /dev/null differ diff --git a/_images/pcolor_small.pdf b/_images/pcolor_small.pdf deleted file mode 100644 index 26130211a2d..00000000000 Binary files a/_images/pcolor_small.pdf and /dev/null differ diff --git a/_images/pie_demo.pdf b/_images/pie_demo.pdf deleted file mode 100644 index 98cefc88711..00000000000 Binary files a/_images/pie_demo.pdf and /dev/null differ diff --git a/_images/pie_demo.png b/_images/pie_demo.png deleted file mode 100644 index da6ab85badd..00000000000 Binary files a/_images/pie_demo.png and /dev/null differ diff --git a/_images/pie_demo1.png b/_images/pie_demo1.png deleted file mode 100644 index da6ab85badd..00000000000 Binary files a/_images/pie_demo1.png and /dev/null differ diff --git a/_images/pie_demo_features.png b/_images/pie_demo_features.png deleted file mode 100644 index f5a64e962bc..00000000000 Binary files a/_images/pie_demo_features.png and /dev/null differ diff --git a/_images/pie_demo_features1.png b/_images/pie_demo_features1.png deleted file mode 100644 index f5a64e962bc..00000000000 Binary files a/_images/pie_demo_features1.png and /dev/null differ diff --git a/_images/plotfile_demo_00.pdf b/_images/plotfile_demo_00.pdf deleted file mode 100644 index ed9672bdd7b..00000000000 Binary files a/_images/plotfile_demo_00.pdf and /dev/null differ diff --git a/_images/plotfile_demo_01.pdf b/_images/plotfile_demo_01.pdf deleted file mode 100644 index ed9672bdd7b..00000000000 Binary files a/_images/plotfile_demo_01.pdf and /dev/null differ diff --git a/_images/plotfile_demo_02.pdf b/_images/plotfile_demo_02.pdf deleted file mode 100644 index 2ba03656400..00000000000 Binary files a/_images/plotfile_demo_02.pdf and /dev/null differ diff --git a/_images/plotfile_demo_03.pdf b/_images/plotfile_demo_03.pdf deleted file mode 100644 index 2ba03656400..00000000000 Binary files a/_images/plotfile_demo_03.pdf and /dev/null differ diff --git a/_images/plotfile_demo_04.pdf b/_images/plotfile_demo_04.pdf deleted file mode 100644 index 5dfe813b6c4..00000000000 Binary files a/_images/plotfile_demo_04.pdf and /dev/null differ diff --git a/_images/plotfile_demo_05.pdf b/_images/plotfile_demo_05.pdf deleted file mode 100644 index ad7b72d5418..00000000000 Binary files a/_images/plotfile_demo_05.pdf and /dev/null differ diff --git a/_images/plotfile_demo_06.pdf b/_images/plotfile_demo_06.pdf deleted file mode 100644 index 3f351d314a3..00000000000 Binary files a/_images/plotfile_demo_06.pdf and /dev/null differ diff --git a/_images/plotfile_demo_07.pdf b/_images/plotfile_demo_07.pdf deleted file mode 100644 index 9672711c49b..00000000000 Binary files a/_images/plotfile_demo_07.pdf and /dev/null differ diff --git a/_images/plotmap.pdf b/_images/plotmap.pdf deleted file mode 100644 index fad799d59f2..00000000000 Binary files a/_images/plotmap.pdf and /dev/null differ diff --git a/_images/polar_bar.pdf b/_images/polar_bar.pdf deleted file mode 100644 index 7679a49f8d8..00000000000 Binary files a/_images/polar_bar.pdf and /dev/null differ diff --git a/_images/polar_bar.png b/_images/polar_bar.png deleted file mode 100644 index 40b25ea676d..00000000000 Binary files a/_images/polar_bar.png and /dev/null differ diff --git a/_images/polar_demo.pdf b/_images/polar_demo.pdf deleted file mode 100644 index 681ff6a0d19..00000000000 Binary files a/_images/polar_demo.pdf and /dev/null differ diff --git a/_images/polar_legend.pdf b/_images/polar_legend.pdf deleted file mode 100644 index e0d26568c73..00000000000 Binary files a/_images/polar_legend.pdf and /dev/null differ diff --git a/_images/polar_scatter.pdf b/_images/polar_scatter.pdf deleted file mode 100644 index f55d80ea978..00000000000 Binary files a/_images/polar_scatter.pdf and /dev/null differ diff --git a/_images/polar_scatter.png b/_images/polar_scatter.png deleted file mode 100644 index 09ece561e72..00000000000 Binary files a/_images/polar_scatter.png and /dev/null differ diff --git a/_images/polys3d_demo.pdf b/_images/polys3d_demo.pdf deleted file mode 100644 index 527e507da8f..00000000000 Binary files a/_images/polys3d_demo.pdf and /dev/null differ diff --git a/_images/poormans_contour.pdf b/_images/poormans_contour.pdf deleted file mode 100644 index 18fe4f42617..00000000000 Binary files a/_images/poormans_contour.pdf and /dev/null differ diff --git a/_images/poormans_contour.png b/_images/poormans_contour.png deleted file mode 100644 index 8cd13099be6..00000000000 Binary files a/_images/poormans_contour.png and /dev/null differ diff --git a/_images/psd_demo.pdf b/_images/psd_demo.pdf deleted file mode 100644 index 31acb320613..00000000000 Binary files a/_images/psd_demo.pdf and /dev/null differ diff --git a/_images/psd_demo.png b/_images/psd_demo.png deleted file mode 100644 index adee4b2c482..00000000000 Binary files a/_images/psd_demo.png and /dev/null differ diff --git a/_images/psd_demo1.png b/_images/psd_demo1.png deleted file mode 100644 index adee4b2c482..00000000000 Binary files a/_images/psd_demo1.png and /dev/null differ diff --git a/_images/psd_demo2.pdf b/_images/psd_demo2.pdf deleted file mode 100644 index d97e05f28d5..00000000000 Binary files a/_images/psd_demo2.pdf and /dev/null differ diff --git a/_images/psd_demo3.pdf b/_images/psd_demo3.pdf deleted file mode 100644 index 462db67f275..00000000000 Binary files a/_images/psd_demo3.pdf and /dev/null differ diff --git a/_images/psd_demo_complex.pdf b/_images/psd_demo_complex.pdf deleted file mode 100644 index d9e8b714979..00000000000 Binary files a/_images/psd_demo_complex.pdf and /dev/null differ diff --git a/_images/pull_button.png b/_images/pull_button.png deleted file mode 100644 index e5031681b97..00000000000 Binary files a/_images/pull_button.png and /dev/null differ diff --git a/_images/pyplot_annotate.pdf b/_images/pyplot_annotate.pdf deleted file mode 100644 index 1a4c649bfb5..00000000000 Binary files a/_images/pyplot_annotate.pdf and /dev/null differ diff --git a/_images/pyplot_formatstr.pdf b/_images/pyplot_formatstr.pdf deleted file mode 100644 index 5d0afac275e..00000000000 Binary files a/_images/pyplot_formatstr.pdf and /dev/null differ diff --git a/_images/pyplot_mathtext.pdf b/_images/pyplot_mathtext.pdf deleted file mode 100644 index 73002320b96..00000000000 Binary files a/_images/pyplot_mathtext.pdf and /dev/null differ diff --git a/_images/pyplot_simple.pdf b/_images/pyplot_simple.pdf deleted file mode 100644 index ece313349d3..00000000000 Binary files a/_images/pyplot_simple.pdf and /dev/null differ diff --git a/_images/pyplot_text.pdf b/_images/pyplot_text.pdf deleted file mode 100644 index b55a8e4ca17..00000000000 Binary files a/_images/pyplot_text.pdf and /dev/null differ diff --git a/_images/pyplot_three.pdf b/_images/pyplot_three.pdf deleted file mode 100644 index 0e79f337d6f..00000000000 Binary files a/_images/pyplot_three.pdf and /dev/null differ diff --git a/_images/pyplot_two_subplots.pdf b/_images/pyplot_two_subplots.pdf deleted file mode 100644 index f9ea09e4fc8..00000000000 Binary files a/_images/pyplot_two_subplots.pdf and /dev/null differ diff --git a/_images/pythonic_matplotlib.pdf b/_images/pythonic_matplotlib.pdf deleted file mode 100644 index 6c3308a447e..00000000000 Binary files a/_images/pythonic_matplotlib.pdf and /dev/null differ diff --git a/_images/quad_bezier.pdf b/_images/quad_bezier.pdf deleted file mode 100644 index 0b08fbedcb7..00000000000 Binary files a/_images/quad_bezier.pdf and /dev/null differ diff --git a/_images/quadmesh_demo.pdf b/_images/quadmesh_demo.pdf deleted file mode 100644 index 0663466bd6b..00000000000 Binary files a/_images/quadmesh_demo.pdf and /dev/null differ diff --git a/_images/quiver_demo_00.pdf b/_images/quiver_demo_00.pdf deleted file mode 100644 index 8842da312a0..00000000000 Binary files a/_images/quiver_demo_00.pdf and /dev/null differ diff --git a/_images/quiver_demo_01.pdf b/_images/quiver_demo_01.pdf deleted file mode 100644 index 94e32b89bee..00000000000 Binary files a/_images/quiver_demo_01.pdf and /dev/null differ diff --git a/_images/quiver_demo_02.pdf b/_images/quiver_demo_02.pdf deleted file mode 100644 index 59df3bbd42a..00000000000 Binary files a/_images/quiver_demo_02.pdf and /dev/null differ diff --git a/_images/quiver_demo_03.pdf b/_images/quiver_demo_03.pdf deleted file mode 100644 index 3982a7ea32a..00000000000 Binary files a/_images/quiver_demo_03.pdf and /dev/null differ diff --git a/_images/quiver_demo_04.pdf b/_images/quiver_demo_04.pdf deleted file mode 100644 index f40ea4e2d19..00000000000 Binary files a/_images/quiver_demo_04.pdf and /dev/null differ diff --git a/_images/quiver_demo_05.pdf b/_images/quiver_demo_05.pdf deleted file mode 100644 index 2d4374d6e66..00000000000 Binary files a/_images/quiver_demo_05.pdf and /dev/null differ diff --git a/_images/radian_demo.pdf b/_images/radian_demo.pdf deleted file mode 100644 index 88da429d25f..00000000000 Binary files a/_images/radian_demo.pdf and /dev/null differ diff --git a/_images/rotate_axes3d_demo.pdf b/_images/rotate_axes3d_demo.pdf deleted file mode 100644 index 3119c7bfbfa..00000000000 Binary files a/_images/rotate_axes3d_demo.pdf and /dev/null differ diff --git a/_images/scatter3d_demo.pdf b/_images/scatter3d_demo.pdf deleted file mode 100644 index c6d593191c2..00000000000 Binary files a/_images/scatter3d_demo.pdf and /dev/null differ diff --git a/_images/scatter_custom_symbol.pdf b/_images/scatter_custom_symbol.pdf deleted file mode 100644 index 768f86a47fd..00000000000 Binary files a/_images/scatter_custom_symbol.pdf and /dev/null differ diff --git a/_images/scatter_demo.pdf b/_images/scatter_demo.pdf deleted file mode 100644 index 09e9b357443..00000000000 Binary files a/_images/scatter_demo.pdf and /dev/null differ diff --git a/_images/scatter_demo2.pdf b/_images/scatter_demo2.pdf deleted file mode 100644 index 12f05fc1343..00000000000 Binary files a/_images/scatter_demo2.pdf and /dev/null differ diff --git a/_images/scatter_hist.pdf b/_images/scatter_hist.pdf deleted file mode 100644 index dd313b76ec5..00000000000 Binary files a/_images/scatter_hist.pdf and /dev/null differ diff --git a/_images/scatter_hist1.pdf b/_images/scatter_hist1.pdf deleted file mode 100644 index cc53ac1120c..00000000000 Binary files a/_images/scatter_hist1.pdf and /dev/null differ diff --git a/_images/scatter_hist2.pdf b/_images/scatter_hist2.pdf deleted file mode 100644 index 2cc777124bb..00000000000 Binary files a/_images/scatter_hist2.pdf and /dev/null differ diff --git a/_images/scatter_masked.pdf b/_images/scatter_masked.pdf deleted file mode 100644 index d6b72588847..00000000000 Binary files a/_images/scatter_masked.pdf and /dev/null differ diff --git a/_images/scatter_piecharts.pdf b/_images/scatter_piecharts.pdf deleted file mode 100644 index 4a491fd4cd4..00000000000 Binary files a/_images/scatter_piecharts.pdf and /dev/null differ diff --git a/_images/scatter_star_poly.pdf b/_images/scatter_star_poly.pdf deleted file mode 100644 index a21dc4080d0..00000000000 Binary files a/_images/scatter_star_poly.pdf and /dev/null differ diff --git a/_images/set_and_get.pdf b/_images/set_and_get.pdf deleted file mode 100644 index e89633ba693..00000000000 Binary files a/_images/set_and_get.pdf and /dev/null differ diff --git a/_images/shading_example.pdf b/_images/shading_example.pdf deleted file mode 100644 index 559d50c4231..00000000000 Binary files a/_images/shading_example.pdf and /dev/null differ diff --git a/_images/shading_example.png b/_images/shading_example.png deleted file mode 100644 index 76f24772314..00000000000 Binary files a/_images/shading_example.png and /dev/null differ diff --git a/_images/shared_axis_demo.pdf b/_images/shared_axis_demo.pdf deleted file mode 100644 index 6d27f677e85..00000000000 Binary files a/_images/shared_axis_demo.pdf and /dev/null differ diff --git a/_images/show_colormaps.pdf b/_images/show_colormaps.pdf deleted file mode 100644 index 674b9c69617..00000000000 Binary files a/_images/show_colormaps.pdf and /dev/null differ diff --git a/_images/show_colormaps.png b/_images/show_colormaps.png deleted file mode 100644 index 7c89b75b945..00000000000 Binary files a/_images/show_colormaps.png and /dev/null differ diff --git a/_images/simple_anchored_artists.pdf b/_images/simple_anchored_artists.pdf deleted file mode 100644 index 1cf479f708e..00000000000 Binary files a/_images/simple_anchored_artists.pdf and /dev/null differ diff --git a/_images/simple_anchored_artists1.pdf b/_images/simple_anchored_artists1.pdf deleted file mode 100644 index 88f1acbc5af..00000000000 Binary files a/_images/simple_anchored_artists1.pdf and /dev/null differ diff --git a/_images/simple_axes_divider2.pdf b/_images/simple_axes_divider2.pdf deleted file mode 100644 index b4799a50365..00000000000 Binary files a/_images/simple_axes_divider2.pdf and /dev/null differ diff --git a/_images/simple_axes_divider3.pdf b/_images/simple_axes_divider3.pdf deleted file mode 100644 index 9e8dbe4534b..00000000000 Binary files a/_images/simple_axes_divider3.pdf and /dev/null differ diff --git a/_images/simple_axesgrid.pdf b/_images/simple_axesgrid.pdf deleted file mode 100644 index 8160b17854d..00000000000 Binary files a/_images/simple_axesgrid.pdf and /dev/null differ diff --git a/_images/simple_axesgrid1.pdf b/_images/simple_axesgrid1.pdf deleted file mode 100644 index 1b9c77197e3..00000000000 Binary files a/_images/simple_axesgrid1.pdf and /dev/null differ diff --git a/_images/simple_axesgrid2.pdf b/_images/simple_axesgrid2.pdf deleted file mode 100644 index 0065c4c7cff..00000000000 Binary files a/_images/simple_axesgrid2.pdf and /dev/null differ diff --git a/_images/simple_axesgrid21.pdf b/_images/simple_axesgrid21.pdf deleted file mode 100644 index 41a446e18da..00000000000 Binary files a/_images/simple_axesgrid21.pdf and /dev/null differ diff --git a/_images/simple_axis_direction01.pdf b/_images/simple_axis_direction01.pdf deleted file mode 100644 index 7d7baf44ca7..00000000000 Binary files a/_images/simple_axis_direction01.pdf and /dev/null differ diff --git a/_images/simple_axis_direction03.pdf b/_images/simple_axis_direction03.pdf deleted file mode 100644 index 2cdbb3e6a20..00000000000 Binary files a/_images/simple_axis_direction03.pdf and /dev/null differ diff --git a/_images/simple_axis_pad.pdf b/_images/simple_axis_pad.pdf deleted file mode 100644 index c63688fdae2..00000000000 Binary files a/_images/simple_axis_pad.pdf and /dev/null differ diff --git a/_images/simple_axisartist1.pdf b/_images/simple_axisartist1.pdf deleted file mode 100644 index ea696dde85f..00000000000 Binary files a/_images/simple_axisartist1.pdf and /dev/null differ diff --git a/_images/simple_axisline3.pdf b/_images/simple_axisline3.pdf deleted file mode 100644 index aad6d5885fe..00000000000 Binary files a/_images/simple_axisline3.pdf and /dev/null differ diff --git a/_images/simple_axisline4.pdf b/_images/simple_axisline4.pdf deleted file mode 100644 index 6662c5f654b..00000000000 Binary files a/_images/simple_axisline4.pdf and /dev/null differ diff --git a/_images/simple_axisline41.pdf b/_images/simple_axisline41.pdf deleted file mode 100644 index afdd31d52b2..00000000000 Binary files a/_images/simple_axisline41.pdf and /dev/null differ diff --git a/_images/simple_colorbar.pdf b/_images/simple_colorbar.pdf deleted file mode 100644 index 4d9c9e9e6da..00000000000 Binary files a/_images/simple_colorbar.pdf and /dev/null differ diff --git a/_images/simple_legend01.pdf b/_images/simple_legend01.pdf deleted file mode 100644 index a7693fdcef3..00000000000 Binary files a/_images/simple_legend01.pdf and /dev/null differ diff --git a/_images/simple_legend02.pdf b/_images/simple_legend02.pdf deleted file mode 100644 index 85935f80b6a..00000000000 Binary files a/_images/simple_legend02.pdf and /dev/null differ diff --git a/_images/simple_plot.pdf b/_images/simple_plot.pdf deleted file mode 100644 index d4a3a89c405..00000000000 Binary files a/_images/simple_plot.pdf and /dev/null differ diff --git a/_images/simple_rgb.pdf b/_images/simple_rgb.pdf deleted file mode 100644 index 4f1498f6e75..00000000000 Binary files a/_images/simple_rgb.pdf and /dev/null differ diff --git a/_images/slider_demo.pdf b/_images/slider_demo.pdf deleted file mode 100644 index 83c9e9648af..00000000000 Binary files a/_images/slider_demo.pdf and /dev/null differ diff --git a/_images/span_regions.pdf b/_images/span_regions.pdf deleted file mode 100644 index c491ea7897d..00000000000 Binary files a/_images/span_regions.pdf and /dev/null differ diff --git a/_images/specgram_demo.pdf b/_images/specgram_demo.pdf deleted file mode 100644 index 457b8da9b46..00000000000 Binary files a/_images/specgram_demo.pdf and /dev/null differ diff --git a/_images/spine_placement_demo_00.pdf b/_images/spine_placement_demo_00.pdf deleted file mode 100644 index 009600dcba1..00000000000 Binary files a/_images/spine_placement_demo_00.pdf and /dev/null differ diff --git a/_images/spine_placement_demo_01.pdf b/_images/spine_placement_demo_01.pdf deleted file mode 100644 index 39103193608..00000000000 Binary files a/_images/spine_placement_demo_01.pdf and /dev/null differ diff --git a/_images/spine_placement_demo_02.pdf b/_images/spine_placement_demo_02.pdf deleted file mode 100644 index 8addfb0bd50..00000000000 Binary files a/_images/spine_placement_demo_02.pdf and /dev/null differ diff --git a/_images/spine_placement_demo_02.png b/_images/spine_placement_demo_02.png deleted file mode 100644 index b0156c6e9a0..00000000000 Binary files a/_images/spine_placement_demo_02.png and /dev/null differ diff --git a/_images/spine_placement_demo_03.pdf b/_images/spine_placement_demo_03.pdf deleted file mode 100644 index c31498293a2..00000000000 Binary files a/_images/spine_placement_demo_03.pdf and /dev/null differ diff --git a/_images/spine_placement_demo_03.png b/_images/spine_placement_demo_03.png deleted file mode 100644 index 92a1e469281..00000000000 Binary files a/_images/spine_placement_demo_03.png and /dev/null differ diff --git a/_images/spy_demos.pdf b/_images/spy_demos.pdf deleted file mode 100644 index bc512a0261f..00000000000 Binary files a/_images/spy_demos.pdf and /dev/null differ diff --git a/_images/stem_plot.pdf b/_images/stem_plot.pdf deleted file mode 100644 index aa556e7b8cf..00000000000 Binary files a/_images/stem_plot.pdf and /dev/null differ diff --git a/_images/step_demo.pdf b/_images/step_demo.pdf deleted file mode 100644 index 1ab90f555a5..00000000000 Binary files a/_images/step_demo.pdf and /dev/null differ diff --git a/_images/stix_fonts_demo.pdf b/_images/stix_fonts_demo.pdf deleted file mode 100644 index 007eb420336..00000000000 Binary files a/_images/stix_fonts_demo.pdf and /dev/null differ diff --git a/_images/stix_fonts_demo.png b/_images/stix_fonts_demo.png deleted file mode 100644 index 547a0afd137..00000000000 Binary files a/_images/stix_fonts_demo.png and /dev/null differ diff --git a/_images/stock_demo.pdf b/_images/stock_demo.pdf deleted file mode 100644 index 7bff48e5a02..00000000000 Binary files a/_images/stock_demo.pdf and /dev/null differ diff --git a/_images/streamplot_demo_00.png b/_images/streamplot_demo_00.png deleted file mode 100644 index 4623062bf8b..00000000000 Binary files a/_images/streamplot_demo_00.png and /dev/null differ diff --git a/_images/streamplot_demo_001.png b/_images/streamplot_demo_001.png deleted file mode 100644 index 4623062bf8b..00000000000 Binary files a/_images/streamplot_demo_001.png and /dev/null differ diff --git a/_images/streamplot_demo_01.png b/_images/streamplot_demo_01.png deleted file mode 100644 index 9edeeee9fc7..00000000000 Binary files a/_images/streamplot_demo_01.png and /dev/null differ diff --git a/_images/streamplot_demo_011.png b/_images/streamplot_demo_011.png deleted file mode 100644 index 9edeeee9fc7..00000000000 Binary files a/_images/streamplot_demo_011.png and /dev/null differ diff --git a/_images/streamplot_with_mask.png b/_images/streamplot_with_mask.png deleted file mode 100644 index 718737b4c31..00000000000 Binary files a/_images/streamplot_with_mask.png and /dev/null differ diff --git a/_images/subplot3d_demo.pdf b/_images/subplot3d_demo.pdf deleted file mode 100644 index c784d31eaa8..00000000000 Binary files a/_images/subplot3d_demo.pdf and /dev/null differ diff --git a/_images/subplot_demo.pdf b/_images/subplot_demo.pdf deleted file mode 100644 index b87b792f09c..00000000000 Binary files a/_images/subplot_demo.pdf and /dev/null differ diff --git a/_images/subplot_toolbar_00.pdf b/_images/subplot_toolbar_00.pdf deleted file mode 100644 index e1e4ad8460d..00000000000 Binary files a/_images/subplot_toolbar_00.pdf and /dev/null differ diff --git a/_images/subplot_toolbar_01.pdf b/_images/subplot_toolbar_01.pdf deleted file mode 100644 index 00110afb225..00000000000 Binary files a/_images/subplot_toolbar_01.pdf and /dev/null differ diff --git a/_images/subplots_adjust.pdf b/_images/subplots_adjust.pdf deleted file mode 100644 index 93dd9b23fb0..00000000000 Binary files a/_images/subplots_adjust.pdf and /dev/null differ diff --git a/_images/subplots_demo_00.pdf b/_images/subplots_demo_00.pdf deleted file mode 100644 index f940a758ed1..00000000000 Binary files a/_images/subplots_demo_00.pdf and /dev/null differ diff --git a/_images/subplots_demo_01.pdf b/_images/subplots_demo_01.pdf deleted file mode 100644 index 31cb636f954..00000000000 Binary files a/_images/subplots_demo_01.pdf and /dev/null differ diff --git a/_images/subplots_demo_02.pdf b/_images/subplots_demo_02.pdf deleted file mode 100644 index 0af06dc2212..00000000000 Binary files a/_images/subplots_demo_02.pdf and /dev/null differ diff --git a/_images/subplots_demo_03.pdf b/_images/subplots_demo_03.pdf deleted file mode 100644 index da7501c1150..00000000000 Binary files a/_images/subplots_demo_03.pdf and /dev/null differ diff --git a/_images/subplots_demo_04.pdf b/_images/subplots_demo_04.pdf deleted file mode 100644 index cf15dbd8a68..00000000000 Binary files a/_images/subplots_demo_04.pdf and /dev/null differ diff --git a/_images/subplots_demo_05.pdf b/_images/subplots_demo_05.pdf deleted file mode 100644 index 2de57dfd61d..00000000000 Binary files a/_images/subplots_demo_05.pdf and /dev/null differ diff --git a/_images/surface3d_demo.pdf b/_images/surface3d_demo.pdf deleted file mode 100644 index 5e5ca09e3ed..00000000000 Binary files a/_images/surface3d_demo.pdf and /dev/null differ diff --git a/_images/surface3d_demo2.pdf b/_images/surface3d_demo2.pdf deleted file mode 100644 index 4556be0c879..00000000000 Binary files a/_images/surface3d_demo2.pdf and /dev/null differ diff --git a/_images/surface3d_demo3.pdf b/_images/surface3d_demo3.pdf deleted file mode 100644 index a5e131bfb7d..00000000000 Binary files a/_images/surface3d_demo3.pdf and /dev/null differ diff --git a/_images/surface3d_radial_demo.pdf b/_images/surface3d_radial_demo.pdf deleted file mode 100644 index 51990f09d85..00000000000 Binary files a/_images/surface3d_radial_demo.pdf and /dev/null differ diff --git a/_images/symlog_demo.pdf b/_images/symlog_demo.pdf deleted file mode 100644 index 66e825aa621..00000000000 Binary files a/_images/symlog_demo.pdf and /dev/null differ diff --git a/_images/table_demo.pdf b/_images/table_demo.pdf deleted file mode 100644 index 329499bbd02..00000000000 Binary files a/_images/table_demo.pdf and /dev/null differ diff --git a/_images/tex_demo.pdf b/_images/tex_demo.pdf deleted file mode 100644 index ebeae9ab9b5..00000000000 Binary files a/_images/tex_demo.pdf and /dev/null differ diff --git a/_images/tex_demo1.pdf b/_images/tex_demo1.pdf deleted file mode 100644 index c0309f5958e..00000000000 Binary files a/_images/tex_demo1.pdf and /dev/null differ diff --git a/_images/tex_unicode_demo.pdf b/_images/tex_unicode_demo.pdf deleted file mode 100644 index c4799fe3a29..00000000000 Binary files a/_images/tex_unicode_demo.pdf and /dev/null differ diff --git a/_images/text3d_demo.pdf b/_images/text3d_demo.pdf deleted file mode 100644 index b930353ea30..00000000000 Binary files a/_images/text3d_demo.pdf and /dev/null differ diff --git a/_images/text_commands.pdf b/_images/text_commands.pdf deleted file mode 100644 index 9930ebcd230..00000000000 Binary files a/_images/text_commands.pdf and /dev/null differ diff --git a/_images/text_handles.pdf b/_images/text_handles.pdf deleted file mode 100644 index ca3f3bfcf12..00000000000 Binary files a/_images/text_handles.pdf and /dev/null differ diff --git a/_images/text_layout.pdf b/_images/text_layout.pdf deleted file mode 100644 index ab8115fff5c..00000000000 Binary files a/_images/text_layout.pdf and /dev/null differ diff --git a/_images/text_rotation.pdf b/_images/text_rotation.pdf deleted file mode 100644 index 9f849e4279b..00000000000 Binary files a/_images/text_rotation.pdf and /dev/null differ diff --git a/_images/text_rotation_relative_to_line.pdf b/_images/text_rotation_relative_to_line.pdf deleted file mode 100644 index 7b0a27d8b7a..00000000000 Binary files a/_images/text_rotation_relative_to_line.pdf and /dev/null differ diff --git a/_images/text_themes.pdf b/_images/text_themes.pdf deleted file mode 100644 index 6ceb573a00a..00000000000 Binary files a/_images/text_themes.pdf and /dev/null differ diff --git a/_images/text_themes.png b/_images/text_themes.png deleted file mode 100644 index d9508fd8cf7..00000000000 Binary files a/_images/text_themes.png and /dev/null differ diff --git a/_images/to_numeric.pdf b/_images/to_numeric.pdf deleted file mode 100644 index fbb05149557..00000000000 Binary files a/_images/to_numeric.pdf and /dev/null differ diff --git a/_images/to_numeric.png b/_images/to_numeric.png deleted file mode 100644 index 4049e6fac20..00000000000 Binary files a/_images/to_numeric.png and /dev/null differ diff --git a/_images/toggle_images.pdf b/_images/toggle_images.pdf deleted file mode 100644 index 0dd04c3a97a..00000000000 Binary files a/_images/toggle_images.pdf and /dev/null differ diff --git a/_images/transoffset.pdf b/_images/transoffset.pdf deleted file mode 100644 index 585166be0dd..00000000000 Binary files a/_images/transoffset.pdf and /dev/null differ diff --git a/_images/tricontour_demo_00.pdf b/_images/tricontour_demo_00.pdf deleted file mode 100644 index fe1f7b2a6e9..00000000000 Binary files a/_images/tricontour_demo_00.pdf and /dev/null differ diff --git a/_images/tricontour_demo_01.pdf b/_images/tricontour_demo_01.pdf deleted file mode 100644 index db090ff33f6..00000000000 Binary files a/_images/tricontour_demo_01.pdf and /dev/null differ diff --git a/_images/tricontour_vs_griddata.pdf b/_images/tricontour_vs_griddata.pdf deleted file mode 100644 index 504886b3893..00000000000 Binary files a/_images/tricontour_vs_griddata.pdf and /dev/null differ diff --git a/_images/tripcolor_demo_00.pdf b/_images/tripcolor_demo_00.pdf deleted file mode 100644 index e55ba0e7093..00000000000 Binary files a/_images/tripcolor_demo_00.pdf and /dev/null differ diff --git a/_images/tripcolor_demo_01.pdf b/_images/tripcolor_demo_01.pdf deleted file mode 100644 index 802cce729b7..00000000000 Binary files a/_images/tripcolor_demo_01.pdf and /dev/null differ diff --git a/_images/triplot_demo_00.pdf b/_images/triplot_demo_00.pdf deleted file mode 100644 index 7131f581556..00000000000 Binary files a/_images/triplot_demo_00.pdf and /dev/null differ diff --git a/_images/triplot_demo_01.pdf b/_images/triplot_demo_01.pdf deleted file mode 100644 index 0e528f717d2..00000000000 Binary files a/_images/triplot_demo_01.pdf and /dev/null differ diff --git a/_images/two_scales.pdf b/_images/two_scales.pdf deleted file mode 100644 index 84181267cf7..00000000000 Binary files a/_images/two_scales.pdf and /dev/null differ diff --git a/_images/unicode_demo.pdf b/_images/unicode_demo.pdf deleted file mode 100644 index a7c5ef81238..00000000000 Binary files a/_images/unicode_demo.pdf and /dev/null differ diff --git a/_images/unicode_minus.pdf b/_images/unicode_minus.pdf deleted file mode 100644 index f341cfb4fcf..00000000000 Binary files a/_images/unicode_minus.pdf and /dev/null differ diff --git a/_images/units_sample.pdf b/_images/units_sample.pdf deleted file mode 100644 index 574e64098cf..00000000000 Binary files a/_images/units_sample.pdf and /dev/null differ diff --git a/_images/units_scatter.pdf b/_images/units_scatter.pdf deleted file mode 100644 index bbd847c925e..00000000000 Binary files a/_images/units_scatter.pdf and /dev/null differ diff --git a/_images/usetex_baseline_test.pdf b/_images/usetex_baseline_test.pdf deleted file mode 100644 index a5dce23e224..00000000000 Binary files a/_images/usetex_baseline_test.pdf and /dev/null differ diff --git a/_images/usetex_demo.pdf b/_images/usetex_demo.pdf deleted file mode 100644 index dca95100a94..00000000000 Binary files a/_images/usetex_demo.pdf and /dev/null differ diff --git a/_images/usetex_fonteffects.pdf b/_images/usetex_fonteffects.pdf deleted file mode 100644 index e24d6af053d..00000000000 Binary files a/_images/usetex_fonteffects.pdf and /dev/null differ diff --git a/_images/vertical_ticklabels.pdf b/_images/vertical_ticklabels.pdf deleted file mode 100644 index fa13640c7bd..00000000000 Binary files a/_images/vertical_ticklabels.pdf and /dev/null differ diff --git a/_images/vertical_ticklabels.png b/_images/vertical_ticklabels.png deleted file mode 100644 index 960f2ad9f7c..00000000000 Binary files a/_images/vertical_ticklabels.png and /dev/null differ diff --git a/_images/vline_demo.pdf b/_images/vline_demo.pdf deleted file mode 100644 index 5e4716951a4..00000000000 Binary files a/_images/vline_demo.pdf and /dev/null differ diff --git a/_images/vline_demo.png b/_images/vline_demo.png deleted file mode 100644 index 7aacb828bcf..00000000000 Binary files a/_images/vline_demo.png and /dev/null differ diff --git a/_images/watermark_image.pdf b/_images/watermark_image.pdf deleted file mode 100644 index d1c310eaf70..00000000000 Binary files a/_images/watermark_image.pdf and /dev/null differ diff --git a/_images/watermark_text.pdf b/_images/watermark_text.pdf deleted file mode 100644 index 2844ce41713..00000000000 Binary files a/_images/watermark_text.pdf and /dev/null differ diff --git a/_images/whats_new-1_00_00.png b/_images/whats_new-1_00_00.png deleted file mode 100644 index bd78724c175..00000000000 Binary files a/_images/whats_new-1_00_00.png and /dev/null differ diff --git a/_images/whats_new-1_01_00.png b/_images/whats_new-1_01_00.png deleted file mode 100644 index 4edd6ebc475..00000000000 Binary files a/_images/whats_new-1_01_00.png and /dev/null differ diff --git a/_images/whats_new-2_00_00.png b/_images/whats_new-2_00_00.png deleted file mode 100644 index c4f7c3a1e1c..00000000000 Binary files a/_images/whats_new-2_00_00.png and /dev/null differ diff --git a/_images/whats_new-2_01_00.png b/_images/whats_new-2_01_00.png deleted file mode 100644 index c12bf3ce295..00000000000 Binary files a/_images/whats_new-2_01_00.png and /dev/null differ diff --git a/_images/whats_new_1_subplot3d.pdf b/_images/whats_new_1_subplot3d.pdf deleted file mode 100644 index 8f86a41e123..00000000000 Binary files a/_images/whats_new_1_subplot3d.pdf and /dev/null differ diff --git a/_images/whats_new_98_4_fancy.pdf b/_images/whats_new_98_4_fancy.pdf deleted file mode 100644 index 047b17f21de..00000000000 Binary files a/_images/whats_new_98_4_fancy.pdf and /dev/null differ diff --git a/_images/whats_new_98_4_fill_between.pdf b/_images/whats_new_98_4_fill_between.pdf deleted file mode 100644 index a4e267327ec..00000000000 Binary files a/_images/whats_new_98_4_fill_between.pdf and /dev/null differ diff --git a/_images/whats_new_98_4_legend.pdf b/_images/whats_new_98_4_legend.pdf deleted file mode 100644 index b9a3e86adfd..00000000000 Binary files a/_images/whats_new_98_4_legend.pdf and /dev/null differ diff --git a/_images/whats_new_99_axes_grid.pdf b/_images/whats_new_99_axes_grid.pdf deleted file mode 100644 index 55fbbcb1d26..00000000000 Binary files a/_images/whats_new_99_axes_grid.pdf and /dev/null differ diff --git a/_images/whats_new_99_mplot3d.pdf b/_images/whats_new_99_mplot3d.pdf deleted file mode 100644 index a5a056a0986..00000000000 Binary files a/_images/whats_new_99_mplot3d.pdf and /dev/null differ diff --git a/_images/whats_new_99_spines.pdf b/_images/whats_new_99_spines.pdf deleted file mode 100644 index d7d85605b06..00000000000 Binary files a/_images/whats_new_99_spines.pdf and /dev/null differ diff --git a/_images/wire3d_animation_demo.pdf b/_images/wire3d_animation_demo.pdf deleted file mode 100644 index 771e25f831d..00000000000 Binary files a/_images/wire3d_animation_demo.pdf and /dev/null differ diff --git a/_images/wire3d_demo.pdf b/_images/wire3d_demo.pdf deleted file mode 100644 index 824ba701b6b..00000000000 Binary files a/_images/wire3d_demo.pdf and /dev/null differ diff --git a/_images/xcorr_demo.pdf b/_images/xcorr_demo.pdf deleted file mode 100644 index 532dde634dd..00000000000 Binary files a/_images/xcorr_demo.pdf and /dev/null differ diff --git a/_images/zorder_demo_00.pdf b/_images/zorder_demo_00.pdf deleted file mode 100644 index 1e9ac785ff6..00000000000 Binary files a/_images/zorder_demo_00.pdf and /dev/null differ diff --git a/_images/zorder_demo_01.pdf b/_images/zorder_demo_01.pdf deleted file mode 100644 index 5b2ece9656e..00000000000 Binary files a/_images/zorder_demo_01.pdf and /dev/null differ diff --git a/cleanout.py b/cleanout.py new file mode 100644 index 00000000000..9cf88ca4136 --- /dev/null +++ b/cleanout.py @@ -0,0 +1,33 @@ +import os +import sys + +""" +Cleans out the top-level (latest) docs from old files. + +Requires a single commandline argument for the latest version. +""" + +redirect = """ + + + + + + + +""" + +latest = sys.argv[-1] + +for tree in ('examples', '_images', 'mpl_examples', 'plot_directive', 'devel', 'users', 'api', 'faq', 'glossary'): + for root, dirs, files in os.walk(tree): + for file in files: + if not os.path.exists(os.path.join(latest, root, file)): + print(os.path.join(root, file)) + + if file.endswith('.html'): + with open(os.path.join(root, file), 'w') as fd: + fd.write(redirect.strip()) + elif file.endswith('.py') or file.endswith('.png') or file.endswith('.pdf'): + os.system('git rm ' + os.path.join(root, file)) diff --git a/devel/outline.html b/devel/outline.html index eacaa470f40..cb04d5ca9bd 100644 --- a/devel/outline.html +++ b/devel/outline.html @@ -1,819 +1,8 @@ - - - - - - Docs outline — Matplotlib 1.2.0 documentation - - - - - - - - - - - - - + - - - - - - - -
-matplotlib -
- - - - - Fork me on GitHub - - - - - -
-
-

Table Of Contents

- - -

Previous topic

-

Adding new scales and projections to matplotlib

-

Next topic

-

Toolkits

-

This Page

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

Docs outline¶

-

Proposed chapters for the docs, who has responsibility for them, and -who reviews them. The “unit” doesn’t have to be a full chapter -(though in some cases it will be), it may be a chapter or a section in -a chapter.

- ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
User’s guide unitAuthorStatusReviewer
plotting 2-D arraysErichas authorPerry ? Darren
colormappingErichas author?
quiver plotsErichas author?
histogramsManuel ?no authorErik Tollerud ?
bar / errorbar?no author?
x-y plots?no authorDarren
time series plots?no author?
date plotsJohnhas author?
working with dataJohnhas authorDarren
custom ticking?no author?
masked dataErichas author?
patches?no author?
legends?no author?
animationJohnhas author?
collections?no author?
text - mathtextMichaelacceptedJohn
text - usetexDarrenacceptedJohn
text - annotationsJohnsubmitted?
fonts et alMichael ?no authorDarren
pyplot tutJohnsubmittedEric
configurationDarrensubmitted?
win32 installCharlie ?no authorDarren
os x installCharlie ?no author?
linux installDarrenhas author?
artist apiJohnsubmitted?
event handlingJohnsubmitted?
navigationJohnsubmitted?
interactive usage?no author?
widgets?no author?
ui - gtk?no author?
ui - wx?no author?
ui - tk?no author?
ui - qtDarrenhas author?
backend - pdfJouni ?no author?
backend - psDarrenhas author?
backend - svg?no author?
backend - agg?no author?
backend - cairo?no author?
-

Here is the ouline for the dev guide, much less fleshed out

- ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Developer’s guide unitAuthorStatusReviewer
the rendererJohnhas authorMichael ?
the canvasJohnhas author?
the artistJohnhas author?
transformsMichaelsubmittedJohn
documenting mplDarrensubmittedJohn, Eric, Mike?
coding guideJohncompleteEric
and_much_more???
-

We also have some work to do converting docstrings to ReST for the API -Reference. Please be sure to follow the few guidelines described in -Formatting. Once it is converted, please include the module in -the API documentation and update the status in the table to “converted”. Once -docstring conversion is complete and all the modules are available in the docs, -we can figure out how best to organize the API Reference and continue from -there.

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ModuleAuthorStatus
backend_agg needs conversion
backend_cairo needs conversion
backend_cocoa needs conversion
backend_emf needs conversion
backend_fltkagg needs conversion
backend_gdk needs conversion
backend_gtk needs conversion
backend_gtkagg needs conversion
backend_gtkcairo needs conversion
backend_mixed needs conversion
backend_pdf needs conversion
backend_psDarrenneeds conversion
backend_qtDarrenneeds conversion
backend_qtaggDarrenneeds conversion
backend_qt4Darrenneeds conversion
backend_qt4aggDarrenneeds conversion
backend_svg needs conversion
backend_template needs conversion
backend_tkagg needs conversion
backend_wx needs conversion
backend_wxagg needs conversion
backends/tkagg needs conversion
config/checkdepDarrenneeds conversion
config/cutilsDarrenneeds conversion
config/mplconfigDarrenneeds conversion
config/mpltraitsDarrenneeds conversion
config/rcparamsDarrenneeds conversion
config/rcsetupDarrenneeds conversion
config/tconfigDarrenneeds conversion
config/verboseDarrenneeds conversion
projections/__init__Mikeconverted
projections/geoMikeconverted (not included–experimental)
projections/polarMikeconverted
afm converted
artist converted
axes converted
axis converted
backend_bases converted
cbook converted
cm converted
collections converted
colorbar converted
colors converted
contour needs conversion
datesDarrenneeds conversion
dvireadDarrenneeds conversion
figureDarrenneeds conversion
financeDarrenneeds conversion
font_managerMikeconverted
fontconfig_patternMikeconverted
image needs conversion
legend needs conversion
linesMike & ???converted
mathtextMikeconverted
mlabJohn/Mikeconverted
mpl N/A
patchesMikeconverted
pathMikeconverted
pylab N/A
pyplot converted
quiver needs conversion
rcsetup needs conversion
scaleMikeconverted
table needs conversion
texmanagerDarrenneeds conversion
textMikeconverted
tickerJohnconverted
transformsMikeconverted
type1font needs conversion
units needs conversion
widgets needs conversion
-

And we might want to do a similar table for the FAQ, but that may also be overkill...

-

If you agree to author a unit, remove the question mark by your name -(or add your name if there is no candidate), and change the status to -“has author”. Once you have completed draft and checked it in, you -can change the status to “submitted” and try to find a reviewer if you -don’t have one. The reviewer should read your chapter, test it for -correctness (eg try your examples) and change the status to “complete” -when done.

-

You are free to lift and convert as much material from the web site or -the existing latex user’s guide as you see fit. The more the better.

-

The UI chapters should give an example or two of using mpl with your -GUI and any relevant info, such as version, installation, config, -etc... The backend chapters should cover backend specific -configuration (eg PS only options), what features are missing, etc...

-

Please feel free to add units, volunteer to review or author a -chapter, etc...

-

It is probably easiest to be an editor. Once you have signed up to be -an editor, if you have an author pester the author for a submission -every so often. If you don’t have an author, find one, and then pester -them! Your only two responsibilities are getting your author to -produce and checking their work, so don’t be shy. You do not need -to be an expert in the subject you are editing – you should know -something about it and be willing to read, test, give feedback and -pester!

-
-

Reviewer notes¶

-

If you want to make notes for the authorwhen you have reviewed a -submission, you can put them here. As the author cleans them up or -addresses them, they should be removed.

-
-

mathtext user’s guide– reviewed by JDH¶

-

This looks good (see Writing mathematical expressions) – there are a few -minor things to close the book on this chapter:

-
    -
  1. -
    The main thing to wrap this up is getting the mathtext module
    -

    ported over to rest and included in the API so the links from the -user’s guide tutorial work.

    -
    -
    -
      -
    • There’s nothing in the mathtext module that I really consider a -“public” API (i.e. that would be useful to people just doing -plots). If mathtext.py were to be documented, I would put it in -the developer’s docs. Maybe I should just take the link in the -user’s guide out. - MGD
    • -
    -
  2. -
  3. This section might also benefit from a little more detail on the -customizations that are possible (eg an example fleshing out the rc -options a little bit). Admittedly, this is pretty clear from -readin ghte rc file, but it might be helpful to a newbie.

    -
      -
    • The only rcParam that is currently useful is mathtext.fontset, -which is documented here. The others only apply when -mathtext.fontset == ‘custom’, which I’d like to declare -“unsupported”. It’s really hard to get a good set of math fonts -working that way, though it might be useful in a bind when -someone has to use a specific wacky font for mathtext and only -needs basics, like sub/superscripts. - MGD
    • -
    -
  4. -
  5. There is still a TODO in the file to include a complete list of symbols

    -
      -
    • Done. It’s pretty extensive, thanks to STIX... - MGD
    • -
    -
  6. -
-
-
-
- - -
-
-
-
-
- - - \ No newline at end of file diff --git a/examples/animation/animate_decay_tk_blit.html b/examples/animation/animate_decay_tk_blit.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/animate_decay_tk_blit.html +++ b/examples/animation/animate_decay_tk_blit.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/animation_blit_fltk.html b/examples/animation/animation_blit_fltk.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/animation_blit_fltk.html +++ b/examples/animation/animation_blit_fltk.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/animation_blit_gtk.html b/examples/animation/animation_blit_gtk.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/animation_blit_gtk.html +++ b/examples/animation/animation_blit_gtk.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/animation_blit_gtk2.html b/examples/animation/animation_blit_gtk2.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/animation_blit_gtk2.html +++ b/examples/animation/animation_blit_gtk2.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/animation_blit_qt.html b/examples/animation/animation_blit_qt.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/animation_blit_qt.html +++ b/examples/animation/animation_blit_qt.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/animation_blit_qt4.html b/examples/animation/animation_blit_qt4.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/animation_blit_qt4.html +++ b/examples/animation/animation_blit_qt4.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/animation_blit_tk.html b/examples/animation/animation_blit_tk.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/animation_blit_tk.html +++ b/examples/animation/animation_blit_tk.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/animation_blit_wx.html b/examples/animation/animation_blit_wx.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/animation_blit_wx.html +++ b/examples/animation/animation_blit_wx.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/draggable_legend.html b/examples/animation/draggable_legend.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/draggable_legend.html +++ b/examples/animation/draggable_legend.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/dynamic_collection.html b/examples/animation/dynamic_collection.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/dynamic_collection.html +++ b/examples/animation/dynamic_collection.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/dynamic_image_gtkagg.html b/examples/animation/dynamic_image_gtkagg.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/dynamic_image_gtkagg.html +++ b/examples/animation/dynamic_image_gtkagg.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/dynamic_image_wxagg2.html b/examples/animation/dynamic_image_wxagg2.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/dynamic_image_wxagg2.html +++ b/examples/animation/dynamic_image_wxagg2.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/gtk_timeout.html b/examples/animation/gtk_timeout.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/gtk_timeout.html +++ b/examples/animation/gtk_timeout.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/histogram_tkagg.html b/examples/animation/histogram_tkagg.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/histogram_tkagg.html +++ b/examples/animation/histogram_tkagg.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/movie_demo.html b/examples/animation/movie_demo.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/movie_demo.html +++ b/examples/animation/movie_demo.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/simple_anim_gtk.html b/examples/animation/simple_anim_gtk.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/simple_anim_gtk.html +++ b/examples/animation/simple_anim_gtk.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/simple_anim_tkagg.html b/examples/animation/simple_anim_tkagg.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/simple_anim_tkagg.html +++ b/examples/animation/simple_anim_tkagg.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/simple_idle_wx.html b/examples/animation/simple_idle_wx.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/simple_idle_wx.html +++ b/examples/animation/simple_idle_wx.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/animation/simple_timer_wx.html b/examples/animation/simple_timer_wx.html index 440f465337b..cb04d5ca9bd 100644 --- a/examples/animation/simple_timer_wx.html +++ b/examples/animation/simple_timer_wx.html @@ -5,4 +5,4 @@ - + \ No newline at end of file diff --git a/examples/api/fahrenheit_celsius_scales.html b/examples/api/fahrenheit_celsius_scales.html index adbcdfbed26..cb04d5ca9bd 100644 --- a/examples/api/fahrenheit_celsius_scales.html +++ b/examples/api/fahrenheit_celsius_scales.html @@ -1,177 +1,8 @@ - - - - api example code: fahrenheit_celsius_scales.py — Matplotlib 1.3.1 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, ax1 = plt.subplots()  # ax1 is the Fahrenheit scale
-ax2 = ax1.twinx()          # ax2 is the Celsius scale
-
-def Tc(Tf):
-    return (5./9.)*(Tf-32)
-
-
-def update_ax2(ax1):
-   y1, y2 = ax1.get_ylim()
-   ax2.set_ylim(Tc(y1), Tc(y2))
-   ax2.figure.canvas.draw()
-
-# automatically update ylim of ax2 when ylim of ax1 changes.
-ax1.callbacks.connect("ylim_changed", update_ax2)
-ax1.plot([78, 79, 79, 77])
-
-ax1.set_title('Two scales: Fahrenheit and Celsius')
-ax1.set_ylabel('Fahrenheit')
-ax2.set_ylabel('Celsius')
-
-plt.show()
-
-
-

Keywords: python, matplotlib, pylab, example, codex (see Search examples)

-
- - -
-
-
-
-
- - - \ No newline at end of file diff --git a/examples/misc/developer_commit_history.html b/examples/misc/developer_commit_history.html index 15cab620944..cb04d5ca9bd 100644 --- a/examples/misc/developer_commit_history.html +++ b/examples/misc/developer_commit_history.html @@ -1,192 +1,8 @@ - - - - misc example code: developer_commit_history.py — Matplotlib 1.3.1 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/examples/misc/developer_commit_history.py b/examples/misc/developer_commit_history.py deleted file mode 100644 index e4577c73e73..00000000000 --- a/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/examples/old_animation/animate_decay_tk_blit.html b/examples/old_animation/animate_decay_tk_blit.html index e29814b9234..cb04d5ca9bd 100644 --- a/examples/old_animation/animate_decay_tk_blit.html +++ b/examples/old_animation/animate_decay_tk_blit.html @@ -1,205 +1,8 @@ - - - - old_animation example code: animate_decay_tk_blit.py — Matplotlib 1.3.1 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, ax = plt.subplots()
-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/examples/old_animation/animate_decay_tk_blit.py b/examples/old_animation/animate_decay_tk_blit.py deleted file mode 100644 index 36e451f803f..00000000000 --- a/examples/old_animation/animate_decay_tk_blit.py +++ /dev/null @@ -1,58 +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, ax = plt.subplots() -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/examples/old_animation/animation_blit_gtk.html b/examples/old_animation/animation_blit_gtk.html index 3a6f1f1b946..cb04d5ca9bd 100644 --- a/examples/old_animation/animation_blit_gtk.html +++ b/examples/old_animation/animation_blit_gtk.html @@ -1,216 +1,8 @@ - - - - old_animation example code: animation_blit_gtk.py — Matplotlib 1.3.1 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, ax = plt.subplots()
-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/examples/old_animation/animation_blit_gtk.py b/examples/old_animation/animation_blit_gtk.py deleted file mode 100644 index 9200daf778f..00000000000 --- a/examples/old_animation/animation_blit_gtk.py +++ /dev/null @@ -1,69 +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, ax = plt.subplots() -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/examples/old_animation/animation_blit_gtk2.html b/examples/old_animation/animation_blit_gtk2.html index 4143a8a555f..cb04d5ca9bd 100644 --- a/examples/old_animation/animation_blit_gtk2.html +++ b/examples/old_animation/animation_blit_gtk2.html @@ -1,315 +1,8 @@ - - - - old_animation example code: animation_blit_gtk2.py — Matplotlib 1.3.1 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, ax = plt.subplots()
-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/examples/old_animation/animation_blit_gtk2.py b/examples/old_animation/animation_blit_gtk2.py deleted file mode 100644 index 58673fd95c2..00000000000 --- a/examples/old_animation/animation_blit_gtk2.py +++ /dev/null @@ -1,168 +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, ax = plt.subplots() -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/examples/old_animation/animation_blit_qt4.html b/examples/old_animation/animation_blit_qt4.html index 3dac05fbdae..cb04d5ca9bd 100644 --- a/examples/old_animation/animation_blit_qt4.html +++ b/examples/old_animation/animation_blit_qt4.html @@ -1,224 +1,8 @@ - - - - old_animation example code: animation_blit_qt4.py — Matplotlib 1.3.1 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/examples/old_animation/animation_blit_qt4.py b/examples/old_animation/animation_blit_qt4.py deleted file mode 100644 index ae2b8450d00..00000000000 --- a/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/examples/old_animation/animation_blit_tk.html b/examples/old_animation/animation_blit_tk.html index b6d0427742b..cb04d5ca9bd 100644 --- a/examples/old_animation/animation_blit_tk.html +++ b/examples/old_animation/animation_blit_tk.html @@ -1,198 +1,8 @@ - - - - old_animation example code: animation_blit_tk.py — Matplotlib 1.3.1 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 matplotlib.pyplot as plt
-import numpy as npy
-import time
-
-fig, ax = plt.subplots()
-canvas = fig.canvas
-
-
-# create the initial line
-x = npy.arange(0,2*npy.pi,0.01)
-line, = plt.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
-
-
-plt.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
-plt.grid() # to ensure proper background restore
-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/examples/old_animation/animation_blit_tk.py b/examples/old_animation/animation_blit_tk.py deleted file mode 100644 index 19779aba4a1..00000000000 --- a/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 matplotlib.pyplot as plt -import numpy as npy -import time - -fig, ax = plt.subplots() -canvas = fig.canvas - - -# create the initial line -x = npy.arange(0,2*npy.pi,0.01) -line, = plt.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 - - -plt.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs -plt.grid() # to ensure proper background restore -manager = plt.get_current_fig_manager() -manager.window.after(100, run) - -plt.show() - - - diff --git a/examples/old_animation/animation_blit_wx.html b/examples/old_animation/animation_blit_wx.html index 5d6db9f04b5..cb04d5ca9bd 100644 --- a/examples/old_animation/animation_blit_wx.html +++ b/examples/old_animation/animation_blit_wx.html @@ -1,226 +1,8 @@ - - - - old_animation example code: animation_blit_wx.py — Matplotlib 1.3.1 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 matplotlib.pyplot as plt
-
-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)
-
-
-fig, ax = plt.subplots()
-canvas = fig.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/examples/old_animation/animation_blit_wx.py b/examples/old_animation/animation_blit_wx.py deleted file mode 100644 index dc7d90c75bc..00000000000 --- a/examples/old_animation/animation_blit_wx.py +++ /dev/null @@ -1,79 +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 matplotlib.pyplot as plt - -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) - - -fig, ax = plt.subplots() -canvas = fig.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/examples/old_animation/draggable_legend.html b/examples/old_animation/draggable_legend.html index 81a19c44a4e..cb04d5ca9bd 100644 --- a/examples/old_animation/draggable_legend.html +++ b/examples/old_animation/draggable_legend.html @@ -1,189 +1,8 @@ - - - - old_animation example code: draggable_legend.py — Matplotlib 1.3.1 documentation - - - - - - - - - - + - - - - - - - - - - - - - -
-matplotlib -
- - - - -
-
-

This Page

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

old_animation example code: draggable_legend.py¶

-

[source code]

-
import matplotlib.pyplot as plt
-
-fig, ax = plt.subplots()
-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/examples/old_animation/draggable_legend.py b/examples/old_animation/draggable_legend.py deleted file mode 100644 index 2a6d8041b6b..00000000000 --- a/examples/old_animation/draggable_legend.py +++ /dev/null @@ -1,42 +0,0 @@ -import matplotlib.pyplot as plt - -fig, ax = plt.subplots() -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/examples/old_animation/dynamic_collection.html b/examples/old_animation/dynamic_collection.html index a76e38dfc20..cb04d5ca9bd 100644 --- a/examples/old_animation/dynamic_collection.html +++ b/examples/old_animation/dynamic_collection.html @@ -1,199 +1,8 @@ - - - - old_animation example code: dynamic_collection.py — Matplotlib 1.3.1 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/examples/old_animation/dynamic_collection.py b/examples/old_animation/dynamic_collection.py deleted file mode 100644 index 3b3fde57259..00000000000 --- a/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/examples/old_animation/dynamic_image_gtkagg.html b/examples/old_animation/dynamic_image_gtkagg.html index a19f74b3e82..cb04d5ca9bd 100644 --- a/examples/old_animation/dynamic_image_gtkagg.html +++ b/examples/old_animation/dynamic_image_gtkagg.html @@ -1,193 +1,8 @@ - - - - old_animation example code: dynamic_image_gtkagg.py — Matplotlib 1.3.1 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/examples/old_animation/dynamic_image_gtkagg.py b/examples/old_animation/dynamic_image_gtkagg.py deleted file mode 100644 index 9e454897d7b..00000000000 --- a/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/examples/old_animation/dynamic_image_wxagg2.html b/examples/old_animation/dynamic_image_wxagg2.html index da6d19c2617..cb04d5ca9bd 100644 --- a/examples/old_animation/dynamic_image_wxagg2.html +++ b/examples/old_animation/dynamic_image_wxagg2.html @@ -1,246 +1,8 @@ - - - - old_animation example code: dynamic_image_wxagg2.py — Matplotlib 1.3.1 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/examples/old_animation/dynamic_image_wxagg2.py b/examples/old_animation/dynamic_image_wxagg2.py deleted file mode 100644 index 81de26d79ca..00000000000 --- a/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/examples/old_animation/gtk_timeout.html b/examples/old_animation/gtk_timeout.html index ec4e94fe1a8..cb04d5ca9bd 100644 --- a/examples/old_animation/gtk_timeout.html +++ b/examples/old_animation/gtk_timeout.html @@ -1,165 +1,8 @@ - - - - old_animation example code: gtk_timeout.py — Matplotlib 1.3.1 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, ax = plt.subplots()
-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/examples/old_animation/gtk_timeout.py b/examples/old_animation/gtk_timeout.py deleted file mode 100644 index d76f609cdb9..00000000000 --- a/examples/old_animation/gtk_timeout.py +++ /dev/null @@ -1,18 +0,0 @@ -import gobject -import numpy as np -import matplotlib -matplotlib.use('GTKAgg') - -import matplotlib.pyplot as plt - -fig, ax = plt.subplots() -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/examples/old_animation/histogram_tkagg.html b/examples/old_animation/histogram_tkagg.html index db7cac99bd6..cb04d5ca9bd 100644 --- a/examples/old_animation/histogram_tkagg.html +++ b/examples/old_animation/histogram_tkagg.html @@ -1,215 +1,8 @@ - - - - old_animation example code: histogram_tkagg.py — Matplotlib 1.3.1 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 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, ax = plt.subplots()
-
-# histogram our data with numpy
-data = np.random.randn(1000)
-n, bins = np.histogram(data, 100)
-
-# get the corners of the rectangles for the histogram
-left = np.array(bins[:-1])
-right = np.array(bins[1:])
-bottom = np.zeros(len(left))
-top = bottom + n
-nrects = len(left)
-
-# here comes the tricky part -- we have to set up the vertex and path
-# codes arrays using moveto, lineto and closepoly
-
-# for each rect: 1 for the MOVETO, 3 for the LINETO, 1 for the
-# CLOSEPOLY; the vert for the closepoly is ignored but we still need
-# it to keep the codes aligned with the vertices
-nverts = nrects*(1+3+1)
-verts = np.zeros((nverts, 2))
-codes = np.ones(nverts, int) * path.Path.LINETO
-codes[0::5] = path.Path.MOVETO
-codes[4::5] = path.Path.CLOSEPOLY
-verts[0::5,0] = left
-verts[0::5,1] = bottom
-verts[1::5,0] = left
-verts[1::5,1] = top
-verts[2::5,0] = right
-verts[2::5,1] = top
-verts[3::5,0] = right
-verts[3::5,1] = bottom
-
-barpath = path.Path(verts, codes)
-patch = patches.PathPatch(barpath, facecolor='green', edgecolor='yellow', alpha=0.5)
-ax.add_patch(patch)
-
-ax.set_xlim(left[0], right[-1])
-ax.set_ylim(bottom.min(), top.max())
-
-def animate():
-    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/examples/old_animation/histogram_tkagg.py b/examples/old_animation/histogram_tkagg.py deleted file mode 100644 index ff37fc48bc7..00000000000 --- a/examples/old_animation/histogram_tkagg.py +++ /dev/null @@ -1,68 +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 -matplotlib.use('TkAgg') # do this before importing pylab - -import matplotlib.pyplot as plt -import matplotlib.patches as patches -import matplotlib.path as path - -fig, ax = plt.subplots() - -# histogram our data with numpy -data = np.random.randn(1000) -n, bins = np.histogram(data, 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/examples/old_animation/index.html b/examples/old_animation/index.html index 09e54b09f1c..cb04d5ca9bd 100644 --- a/examples/old_animation/index.html +++ b/examples/old_animation/index.html @@ -1,175 +1,8 @@ - - - - old_animation Examples — Matplotlib 1.3.1 documentation - - - - - - - - - - + - - - - - - - - - - - - - -
-matplotlib -
- - - - -
-
-

This Page

- - - -
-
- -
-
- -
-
-
- - - \ No newline at end of file diff --git a/examples/old_animation/movie_demo.html b/examples/old_animation/movie_demo.html index 818405e579b..cb04d5ca9bd 100644 --- a/examples/old_animation/movie_demo.html +++ b/examples/old_animation/movie_demo.html @@ -1,304 +1,8 @@ - - - - old_animation example code: movie_demo.py — Matplotlib 1.3.1 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/examples/old_animation/movie_demo.py b/examples/old_animation/movie_demo.py deleted file mode 100644 index 0abf4a9e422..00000000000 --- a/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/examples/old_animation/simple_anim_gtk.html b/examples/old_animation/simple_anim_gtk.html index 70c2609aa57..cb04d5ca9bd 100644 --- a/examples/old_animation/simple_anim_gtk.html +++ b/examples/old_animation/simple_anim_gtk.html @@ -1,176 +1,8 @@ - - - - old_animation example code: simple_anim_gtk.py — Matplotlib 1.3.1 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, ax = plt.subplots()
-
-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/examples/old_animation/simple_anim_gtk.py b/examples/old_animation/simple_anim_gtk.py deleted file mode 100644 index ecdec733364..00000000000 --- a/examples/old_animation/simple_anim_gtk.py +++ /dev/null @@ -1,29 +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, ax = plt.subplots() - -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/examples/old_animation/simple_anim_tkagg.html b/examples/old_animation/simple_anim_tkagg.html index 84bad8d01af..cb04d5ca9bd 100644 --- a/examples/old_animation/simple_anim_tkagg.html +++ b/examples/old_animation/simple_anim_tkagg.html @@ -1,174 +1,8 @@ - - - - old_animation example code: simple_anim_tkagg.py — Matplotlib 1.3.1 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, ax = plt.subplots()
-
-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/examples/old_animation/simple_anim_tkagg.py b/examples/old_animation/simple_anim_tkagg.py deleted file mode 100644 index e8a3a5ca314..00000000000 --- a/examples/old_animation/simple_anim_tkagg.py +++ /dev/null @@ -1,27 +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, ax = plt.subplots() - -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/examples/old_animation/simple_idle_wx.html b/examples/old_animation/simple_idle_wx.html index ad3c3784736..cb04d5ca9bd 100644 --- a/examples/old_animation/simple_idle_wx.html +++ b/examples/old_animation/simple_idle_wx.html @@ -1,174 +1,8 @@ - - - - old_animation example code: simple_idle_wx.py — Matplotlib 1.3.1 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 numpy as np
-import matplotlib
-matplotlib.use('WXAgg') # do this before importing pylab
-
-import matplotlib.pyplot as plt
-
-fig, ax = plt.subplots()
-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/examples/old_animation/simple_idle_wx.py b/examples/old_animation/simple_idle_wx.py deleted file mode 100644 index 16541597623..00000000000 --- a/examples/old_animation/simple_idle_wx.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -A simple example of an animated plot using a wx backend -""" -from __future__ import print_function -import numpy as np -import matplotlib -matplotlib.use('WXAgg') # do this before importing pylab - -import matplotlib.pyplot as plt - -fig, ax = plt.subplots() -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/examples/old_animation/simple_timer_wx.html b/examples/old_animation/simple_timer_wx.html index 97fd211d7bf..cb04d5ca9bd 100644 --- a/examples/old_animation/simple_timer_wx.html +++ b/examples/old_animation/simple_timer_wx.html @@ -1,181 +1,8 @@ - - - - old_animation example code: simple_timer_wx.py — Matplotlib 1.3.1 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 numpy as np
-import matplotlib
-matplotlib.use('WXAgg') # do this before importing pylab
-
-import matplotlib.pyplot as plt
-
-fig, ax = plt.subplots()
-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/examples/old_animation/simple_timer_wx.py b/examples/old_animation/simple_timer_wx.py deleted file mode 100644 index a427524effd..00000000000 --- a/examples/old_animation/simple_timer_wx.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import print_function -""" -A simple example of an animated plot using a wx backend -""" -import numpy as np -import matplotlib -matplotlib.use('WXAgg') # do this before importing pylab - -import matplotlib.pyplot as plt - -fig, ax = plt.subplots() -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/examples/old_animation/strip_chart_demo.html b/examples/old_animation/strip_chart_demo.html index 81716cd6fc8..cb04d5ca9bd 100644 --- a/examples/old_animation/strip_chart_demo.html +++ b/examples/old_animation/strip_chart_demo.html @@ -1,217 +1,8 @@ - - - - old_animation example code: strip_chart_demo.py — Matplotlib 1.3.1 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
-import matplotlib.pyplot as plt
-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
-
-
-fig, ax = plt.subplots()
-scope = Scope(ax)
-gobject.idle_add(scope.update)
-
-plt.show()
-
-
-

Keywords: python, matplotlib, pylab, example, codex (see Search examples)

-
- - -
-
-
-
-
- - - \ No newline at end of file diff --git a/examples/old_animation/strip_chart_demo.py b/examples/old_animation/strip_chart_demo.py deleted file mode 100644 index 7f659afd020..00000000000 --- a/examples/old_animation/strip_chart_demo.py +++ /dev/null @@ -1,70 +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 -import matplotlib.pyplot as plt -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 - - -fig, ax = plt.subplots() -scope = Scope(ax) -gobject.idle_add(scope.update) - -plt.show() diff --git a/examples/pngsuite/index.html b/examples/pngsuite/index.html index a18a6db22bd..cb04d5ca9bd 100644 --- a/examples/pngsuite/index.html +++ b/examples/pngsuite/index.html @@ -1,150 +1,8 @@ - - - - - pngsuite Examples — Matplotlib v1.1.0 documentation - - - - - - - - + - - - - - - - -
-matplotlib -
- - - -
-
-

This Page

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

pngsuite Examples¶

- --- - - - - - -
Release:1.1.0
Date:February 23, 2011
- -
- - -
-
-
-
-
- - - \ No newline at end of file diff --git a/examples/pngsuite/pngsuite.html b/examples/pngsuite/pngsuite.html index 220e4b57755..cb04d5ca9bd 100644 --- a/examples/pngsuite/pngsuite.html +++ b/examples/pngsuite/pngsuite.html @@ -1,168 +1,8 @@ - - - - - pngsuite example code: pngsuite.py — Matplotlib v1.1.0 documentation - - - - - - - - + - - - - - - - -
-matplotlib -
- - - -
-
-

This Page

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

pngsuite example code: pngsuite.py¶

-

[source code]

-
"""
-This test loads a subset of the files in Willem van Schaik's PNG test
-suite available here:
-
-   http://libpng.org/pub/png/pngsuite.html
-
-The result should look like truth.png.
-"""
-
-from matplotlib import pyplot as plt
-import matplotlib.cm as cm
-import glob
-
-files = glob.glob("basn*.png")
-files.sort()
-
-plt.figure(figsize=(len(files), 2))
-
-for i, fname in enumerate(files):
-    data = plt.imread(fname)
-    cmap = None # use default colormap
-    if data.ndim==2:
-        # keep grayscale images gray
-        cmap = cm.gray
-    plt.imshow(data, extent=[i,i+1,0,1], cmap=cmap)
-
-plt.gca().get_frame().set_facecolor("#ddffff")
-plt.gca().set_xlim(0, len(files))
-plt.show()
-
-
-

Keywords: python, matplotlib, pylab, example, codex (see Search examples)

-
- - -
-
-
-
-
- - - \ No newline at end of file diff --git a/examples/pngsuite/pngsuite.py b/examples/pngsuite/pngsuite.py deleted file mode 100644 index ca8d162bc26..00000000000 --- a/examples/pngsuite/pngsuite.py +++ /dev/null @@ -1,29 +0,0 @@ -""" -This test loads a subset of the files in Willem van Schaik's PNG test -suite available here: - - http://libpng.org/pub/png/pngsuite.html - -The result should look like truth.png. -""" - -from matplotlib import pyplot as plt -import matplotlib.cm as cm -import glob - -files = glob.glob("basn*.png") -files.sort() - -plt.figure(figsize=(len(files), 2)) - -for i, fname in enumerate(files): - data = plt.imread(fname) - cmap = None # use default colormap - if data.ndim==2: - # keep grayscale images gray - cmap = cm.gray - plt.imshow(data, extent=[i,i+1,0,1], cmap=cmap) - -plt.gca().get_frame().set_facecolor("#ddffff") -plt.gca().set_xlim(0, len(files)) -plt.show() diff --git a/examples/pylab_examples/contourf_log.html b/examples/pylab_examples/contourf_log.html index 2f4d7e6518f..cb04d5ca9bd 100644 --- a/examples/pylab_examples/contourf_log.html +++ b/examples/pylab_examples/contourf_log.html @@ -1,208 +1,8 @@ - - - - pylab_examples example code: contourf_log.py — Matplotlib 1.4.3 documentation - - - - - - - - - - - - - - - + - -
-

We're updating the default styles for Matplotlib 2.0

- -

Learn what to expect in the new updates

- -
- - - - - - - - - - - -
-matplotlib -
- - - - - - - -
-
-

Previous topic

-

pylab_examples example code: contourf_hatching.py

-

Next topic

-

pylab_examples example code: coords_demo.py

-

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/examples/pylab_examples/dannys_example.html b/examples/pylab_examples/dannys_example.html index a71f25e1f7d..cb04d5ca9bd 100644 --- a/examples/pylab_examples/dannys_example.html +++ b/examples/pylab_examples/dannys_example.html @@ -1,209 +1,8 @@ - - - - pylab_examples example code: dannys_example.py — Matplotlib 1.3.1 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/examples/pylab_examples/filledmarker_demo.html b/examples/pylab_examples/filledmarker_demo.html index 235ff062daa..cb04d5ca9bd 100644 --- a/examples/pylab_examples/filledmarker_demo.html +++ b/examples/pylab_examples/filledmarker_demo.html @@ -1,237 +1,8 @@ - - - - pylab_examples example code: filledmarker_demo.py — Matplotlib 1.3.1 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/examples/pylab_examples/histogram_demo_extended.html b/examples/pylab_examples/histogram_demo_extended.html index 8e8cc7c082b..cb04d5ca9bd 100644 --- a/examples/pylab_examples/histogram_demo_extended.html +++ b/examples/pylab_examples/histogram_demo_extended.html @@ -1,297 +1,8 @@ - - - - pylab_examples example code: histogram_demo_extended.py — Matplotlib 1.3.1 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/examples/pylab_examples/legend_auto.html b/examples/pylab_examples/legend_auto.html index fcd1f8e1d02..cb04d5ca9bd 100644 --- a/examples/pylab_examples/legend_auto.html +++ b/examples/pylab_examples/legend_auto.html @@ -1,283 +1,8 @@ - - - - pylab_examples example code: legend_auto.py — Matplotlib 1.3.1 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/examples/pylab_examples/legend_demo.html b/examples/pylab_examples/legend_demo.html index 70e95835fad..cb04d5ca9bd 100644 --- a/examples/pylab_examples/legend_demo.html +++ b/examples/pylab_examples/legend_demo.html @@ -1,192 +1,8 @@ - - - - pylab_examples example code: legend_demo.py — Matplotlib 1.3.1 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/examples/pylab_examples/legend_demo_custom_handler.html b/examples/pylab_examples/legend_demo_custom_handler.html index bbb011481f0..cb04d5ca9bd 100644 --- a/examples/pylab_examples/legend_demo_custom_handler.html +++ b/examples/pylab_examples/legend_demo_custom_handler.html @@ -1,180 +1,8 @@ - - - - pylab_examples example code: legend_demo_custom_handler.py — Matplotlib 1.3.1 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/examples/pylab_examples/legend_scatter.html b/examples/pylab_examples/legend_scatter.html index 4433b5db8cc..cb04d5ca9bd 100644 --- a/examples/pylab_examples/legend_scatter.html +++ b/examples/pylab_examples/legend_scatter.html @@ -1,169 +1,8 @@ - - - - pylab_examples example code: legend_scatter.py — Matplotlib 1.3.1 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/examples/pylab_examples/legend_translucent.html b/examples/pylab_examples/legend_translucent.html index 14238218d9d..cb04d5ca9bd 100644 --- a/examples/pylab_examples/legend_translucent.html +++ b/examples/pylab_examples/legend_translucent.html @@ -1,168 +1,8 @@ - - - - pylab_examples example code: legend_translucent.py — Matplotlib 1.3.1 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/examples/pylab_examples/line_styles.html b/examples/pylab_examples/line_styles.html index fe6c3b5c50d..cb04d5ca9bd 100644 --- a/examples/pylab_examples/line_styles.html +++ b/examples/pylab_examples/line_styles.html @@ -1,195 +1,8 @@ - - - - pylab_examples example code: line_styles.py — Matplotlib 1.3.1 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/examples/pylab_examples/pstest.html b/examples/pylab_examples/pstest.html index a5b68878809..cb04d5ca9bd 100644 --- a/examples/pylab_examples/pstest.html +++ b/examples/pylab_examples/pstest.html @@ -1,188 +1,8 @@ - - - - pylab_examples example code: pstest.py — Matplotlib 1.4.3 documentation - - - - - - - - - - - - - - - + - -
-

We're updating the default styles for Matplotlib 2.0

- -

Learn what to expect in the new updates

- -
- - - - - - - - - - - -
-matplotlib -
- - - - - - - -
-
-

Previous topic

-

pylab_examples example code: psd_demo_complex.py

-

Next topic

-

pylab_examples example code: pythonic_matplotlib.py

-

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/examples/pylab_examples/pstest.py b/examples/pylab_examples/pstest.py deleted file mode 100644 index 4ddc925f811..00000000000 --- a/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/examples/pylab_examples/scatter_profile.py b/examples/pylab_examples/scatter_profile.py deleted file mode 100644 index 36952bdfc8f..00000000000 --- a/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/examples/pylab_examples/shared_axis_across_figures.py b/examples/pylab_examples/shared_axis_across_figures.py deleted file mode 100644 index b4cc8c70d35..00000000000 --- a/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/examples/pylab_examples/simple_plot_fps.py b/examples/pylab_examples/simple_plot_fps.py deleted file mode 100644 index 545947966b5..00000000000 --- a/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/examples/pylab_examples/system_monitor.py b/examples/pylab_examples/system_monitor.py deleted file mode 100644 index 76b0b965f0c..00000000000 --- a/examples/pylab_examples/system_monitor.py +++ /dev/null @@ -1,52 +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, ax = plt.subplots() -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/examples/pylab_examples/to_numeric.html b/examples/pylab_examples/to_numeric.html index 098a37d26a8..cb04d5ca9bd 100644 --- a/examples/pylab_examples/to_numeric.html +++ b/examples/pylab_examples/to_numeric.html @@ -1,194 +1,8 @@ - - - - pylab_examples example code: to_numeric.py — Matplotlib 1.4.3 documentation - - - - - - - - - - - - - - - + - -
-

We're updating the default styles for Matplotlib 2.0

- -

Learn what to expect in the new updates

- -
- - - - - - - - - - - -
-matplotlib -
- - - - - - - -
-
-

Previous topic

-

pylab_examples example code: titles_demo.py

-

Next topic

-

pylab_examples example code: toggle_images.py

-

This Page

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

pylab_examples example code: to_numeric.py¶

-

(Source code)

-
#!/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 it to Pillow 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)
-
-# Uncomment this line to display the image using ImageMagick's
-# `display` tool.
-# im.show()
-
-
-

Keywords: python, matplotlib, pylab, example, codex (see Search examples)

-
- - -
-
-
- -
-
- - - - \ No newline at end of file diff --git a/examples/user_interfaces/embedding_in_qt.html b/examples/user_interfaces/embedding_in_qt.html index 22f571e68ce..cb04d5ca9bd 100644 --- a/examples/user_interfaces/embedding_in_qt.html +++ b/examples/user_interfaces/embedding_in_qt.html @@ -1,9 +1,8 @@ - - + - + \ No newline at end of file diff --git a/examples/user_interfaces/embedding_in_qt.py b/examples/user_interfaces/embedding_in_qt.py deleted file mode 100644 index 311fd9e961f..00000000000 --- a/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/mpl_examples/api/artist_demo.hires.png b/mpl_examples/api/artist_demo.hires.png deleted file mode 100644 index 35579c4646a..00000000000 Binary files a/mpl_examples/api/artist_demo.hires.png and /dev/null differ diff --git a/mpl_examples/api/artist_demo.pdf b/mpl_examples/api/artist_demo.pdf deleted file mode 100644 index 51dec675665..00000000000 Binary files a/mpl_examples/api/artist_demo.pdf and /dev/null differ diff --git a/mpl_examples/api/artist_demo.png b/mpl_examples/api/artist_demo.png deleted file mode 100644 index 8a95925cff7..00000000000 Binary files a/mpl_examples/api/artist_demo.png and /dev/null differ diff --git a/mpl_examples/api/artist_demo.py b/mpl_examples/api/artist_demo.py deleted file mode 100644 index 35dc77759c6..00000000000 --- a/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/mpl_examples/api/clippath_demo.hires.png b/mpl_examples/api/clippath_demo.hires.png deleted file mode 100644 index 970194adbd5..00000000000 Binary files a/mpl_examples/api/clippath_demo.hires.png and /dev/null differ diff --git a/mpl_examples/api/clippath_demo.pdf b/mpl_examples/api/clippath_demo.pdf deleted file mode 100644 index 4224fbd1379..00000000000 Binary files a/mpl_examples/api/clippath_demo.pdf and /dev/null differ diff --git a/mpl_examples/api/clippath_demo.png b/mpl_examples/api/clippath_demo.png deleted file mode 100644 index 88ecee572ac..00000000000 Binary files a/mpl_examples/api/clippath_demo.png and /dev/null differ diff --git a/mpl_examples/api/clippath_demo.py b/mpl_examples/api/clippath_demo.py deleted file mode 100644 index 7a07467524b..00000000000 --- a/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/mpl_examples/api/color_cycle.hires.png b/mpl_examples/api/color_cycle.hires.png deleted file mode 100644 index c41e5e5bc1c..00000000000 Binary files a/mpl_examples/api/color_cycle.hires.png and /dev/null differ diff --git a/mpl_examples/api/color_cycle.pdf b/mpl_examples/api/color_cycle.pdf deleted file mode 100644 index e255ed2df80..00000000000 Binary files a/mpl_examples/api/color_cycle.pdf and /dev/null differ diff --git a/mpl_examples/api/color_cycle.png b/mpl_examples/api/color_cycle.png deleted file mode 100644 index 960361dbe53..00000000000 Binary files a/mpl_examples/api/color_cycle.png and /dev/null differ diff --git a/mpl_examples/api/color_cycle.py b/mpl_examples/api/color_cycle.py deleted file mode 100644 index 6b2abe873cd..00000000000 --- a/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/mpl_examples/api/fahrenheit_celcius_scales.hires.png b/mpl_examples/api/fahrenheit_celcius_scales.hires.png deleted file mode 100644 index b00f10da1be..00000000000 Binary files a/mpl_examples/api/fahrenheit_celcius_scales.hires.png and /dev/null differ diff --git a/mpl_examples/api/fahrenheit_celcius_scales.pdf b/mpl_examples/api/fahrenheit_celcius_scales.pdf deleted file mode 100644 index d629dffb7b4..00000000000 Binary files a/mpl_examples/api/fahrenheit_celcius_scales.pdf and /dev/null differ diff --git a/mpl_examples/api/fahrenheit_celcius_scales.png b/mpl_examples/api/fahrenheit_celcius_scales.png deleted file mode 100644 index 90229b7f65c..00000000000 Binary files a/mpl_examples/api/fahrenheit_celcius_scales.png and /dev/null differ diff --git a/mpl_examples/api/fahrenheit_celcius_scales.py b/mpl_examples/api/fahrenheit_celcius_scales.py deleted file mode 100644 index 2a10441683e..00000000000 --- a/mpl_examples/api/fahrenheit_celcius_scales.py +++ /dev/null @@ -1,28 +0,0 @@ -""" -Shoiw how to display two scales on the left and right y axis -- Fahrenheit and Celcius -""" - -import matplotlib.pyplot as plt - -fig = plt.figure() -ax1 = fig.add_subplot(111) # the Fahrenheit scale -ax2 = ax1.twinx() # the Celcius scale - -def Tc(Tf): - return (5./9.)*(Tf-32) - - -def update_ax2(ax1): - y1, y2 = ax1.get_ylim() - ax2.set_ylim(Tc(y1), Tc(y2)) - ax2.figure.canvas.draw() - -# automatically update ylim of ax2 when ylim of ax1 changes. -ax1.callbacks.connect("ylim_changed", update_ax2) -ax1.plot([78, 79, 79, 77]) - -ax1.set_title('Two scales: Fahrenheit and Celcius') -ax1.set_ylabel('Fahrenheit') -ax2.set_ylabel('Celcius') - -plt.show() diff --git a/mpl_examples/api/fahrenheit_celsius_scales.hires.png b/mpl_examples/api/fahrenheit_celsius_scales.hires.png deleted file mode 100644 index 5e35a1d96c9..00000000000 Binary files a/mpl_examples/api/fahrenheit_celsius_scales.hires.png and /dev/null differ diff --git a/mpl_examples/api/fahrenheit_celsius_scales.pdf b/mpl_examples/api/fahrenheit_celsius_scales.pdf deleted file mode 100644 index 7ca46e93a7f..00000000000 Binary files a/mpl_examples/api/fahrenheit_celsius_scales.pdf and /dev/null differ diff --git a/mpl_examples/api/fahrenheit_celsius_scales.png b/mpl_examples/api/fahrenheit_celsius_scales.png deleted file mode 100644 index cafeefc83af..00000000000 Binary files a/mpl_examples/api/fahrenheit_celsius_scales.png and /dev/null differ diff --git a/mpl_examples/api/fahrenheit_celsius_scales.py b/mpl_examples/api/fahrenheit_celsius_scales.py deleted file mode 100644 index 72a52f4fa41..00000000000 --- a/mpl_examples/api/fahrenheit_celsius_scales.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -Show how to display two scales on the left and right y axis -- Fahrenheit and Celsius -""" - -import matplotlib.pyplot as plt - -fig, ax1 = plt.subplots() # ax1 is the Fahrenheit scale -ax2 = ax1.twinx() # ax2 is the Celsius scale - -def Tc(Tf): - return (5./9.)*(Tf-32) - - -def update_ax2(ax1): - y1, y2 = ax1.get_ylim() - ax2.set_ylim(Tc(y1), Tc(y2)) - ax2.figure.canvas.draw() - -# automatically update ylim of ax2 when ylim of ax1 changes. -ax1.callbacks.connect("ylim_changed", update_ax2) -ax1.plot([78, 79, 79, 77]) - -ax1.set_title('Two scales: Fahrenheit and Celsius') -ax1.set_ylabel('Fahrenheit') -ax2.set_ylabel('Celsius') - -plt.show() diff --git a/mpl_examples/api/hinton_demo.hires.png b/mpl_examples/api/hinton_demo.hires.png deleted file mode 100644 index 393428d000d..00000000000 Binary files a/mpl_examples/api/hinton_demo.hires.png and /dev/null differ diff --git a/mpl_examples/api/hinton_demo.pdf b/mpl_examples/api/hinton_demo.pdf deleted file mode 100644 index 57eab9c51b8..00000000000 Binary files a/mpl_examples/api/hinton_demo.pdf and /dev/null differ diff --git a/mpl_examples/api/hinton_demo.png b/mpl_examples/api/hinton_demo.png deleted file mode 100644 index 583d5175f44..00000000000 Binary files a/mpl_examples/api/hinton_demo.png and /dev/null differ diff --git a/mpl_examples/api/hinton_demo.py b/mpl_examples/api/hinton_demo.py deleted file mode 100644 index 700e13c1bb6..00000000000 --- a/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/mpl_examples/api/histogram_demo.hires.png b/mpl_examples/api/histogram_demo.hires.png deleted file mode 100644 index 17d2d13aabb..00000000000 Binary files a/mpl_examples/api/histogram_demo.hires.png and /dev/null differ diff --git a/mpl_examples/api/histogram_demo.pdf b/mpl_examples/api/histogram_demo.pdf deleted file mode 100644 index 6658e504907..00000000000 Binary files a/mpl_examples/api/histogram_demo.pdf and /dev/null differ diff --git a/mpl_examples/api/histogram_demo.png b/mpl_examples/api/histogram_demo.png deleted file mode 100644 index 488e6610cdb..00000000000 Binary files a/mpl_examples/api/histogram_demo.png and /dev/null differ diff --git a/mpl_examples/api/histogram_demo.py b/mpl_examples/api/histogram_demo.py deleted file mode 100644 index 11c4b0adaba..00000000000 --- a/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/mpl_examples/api/path_patch_demo.hires.png b/mpl_examples/api/path_patch_demo.hires.png deleted file mode 100644 index f70c8b43bea..00000000000 Binary files a/mpl_examples/api/path_patch_demo.hires.png and /dev/null differ diff --git a/mpl_examples/api/path_patch_demo.pdf b/mpl_examples/api/path_patch_demo.pdf deleted file mode 100644 index c68faef7f52..00000000000 Binary files a/mpl_examples/api/path_patch_demo.pdf and /dev/null differ diff --git a/mpl_examples/api/path_patch_demo.png b/mpl_examples/api/path_patch_demo.png deleted file mode 100644 index e93251f0f20..00000000000 Binary files a/mpl_examples/api/path_patch_demo.png and /dev/null differ diff --git a/mpl_examples/api/path_patch_demo.py b/mpl_examples/api/path_patch_demo.py deleted file mode 100644 index d28fa2c3701..00000000000 --- a/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/mpl_examples/pie_and_polar_charts/pie_demo_features.hires.png b/mpl_examples/pie_and_polar_charts/pie_demo_features.hires.png deleted file mode 100644 index 9dc83ed4cd3..00000000000 Binary files a/mpl_examples/pie_and_polar_charts/pie_demo_features.hires.png and /dev/null differ diff --git a/mpl_examples/pie_and_polar_charts/pie_demo_features.pdf b/mpl_examples/pie_and_polar_charts/pie_demo_features.pdf deleted file mode 100644 index 8a577bd2f42..00000000000 Binary files a/mpl_examples/pie_and_polar_charts/pie_demo_features.pdf and /dev/null differ diff --git a/mpl_examples/pie_and_polar_charts/pie_demo_features.png b/mpl_examples/pie_and_polar_charts/pie_demo_features.png deleted file mode 100644 index f5a64e962bc..00000000000 Binary files a/mpl_examples/pie_and_polar_charts/pie_demo_features.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/barh_demo.py b/mpl_examples/pylab_examples/barh_demo.py deleted file mode 100644 index 0daef263fd3..00000000000 --- a/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/mpl_examples/pylab_examples/barh_demo_00.hires.png b/mpl_examples/pylab_examples/barh_demo_00.hires.png deleted file mode 100644 index 19557ec6282..00000000000 Binary files a/mpl_examples/pylab_examples/barh_demo_00.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/barh_demo_00.pdf b/mpl_examples/pylab_examples/barh_demo_00.pdf deleted file mode 100644 index db0f2390ed1..00000000000 Binary files a/mpl_examples/pylab_examples/barh_demo_00.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/barh_demo_00.png b/mpl_examples/pylab_examples/barh_demo_00.png deleted file mode 100644 index 701ea1f697c..00000000000 Binary files a/mpl_examples/pylab_examples/barh_demo_00.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/barh_demo_01.hires.png b/mpl_examples/pylab_examples/barh_demo_01.hires.png deleted file mode 100644 index f64aacc55c2..00000000000 Binary files a/mpl_examples/pylab_examples/barh_demo_01.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/barh_demo_01.pdf b/mpl_examples/pylab_examples/barh_demo_01.pdf deleted file mode 100644 index 1979a0c73d9..00000000000 Binary files a/mpl_examples/pylab_examples/barh_demo_01.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/barh_demo_01.png b/mpl_examples/pylab_examples/barh_demo_01.png deleted file mode 100644 index 16ee0291031..00000000000 Binary files a/mpl_examples/pylab_examples/barh_demo_01.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/contourf_log.hires.png b/mpl_examples/pylab_examples/contourf_log.hires.png deleted file mode 100644 index 0e91e10d3e9..00000000000 Binary files a/mpl_examples/pylab_examples/contourf_log.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/contourf_log.pdf b/mpl_examples/pylab_examples/contourf_log.pdf deleted file mode 100644 index 7b4d8a03483..00000000000 Binary files a/mpl_examples/pylab_examples/contourf_log.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/contourf_log.png b/mpl_examples/pylab_examples/contourf_log.png deleted file mode 100644 index ce0abd0f9b0..00000000000 Binary files a/mpl_examples/pylab_examples/contourf_log.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/contourf_log.py b/mpl_examples/pylab_examples/contourf_log.py deleted file mode 100644 index de24cf0d2f0..00000000000 --- a/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/mpl_examples/pylab_examples/dannys_example.hires.png b/mpl_examples/pylab_examples/dannys_example.hires.png deleted file mode 100644 index b8fe99322e0..00000000000 Binary files a/mpl_examples/pylab_examples/dannys_example.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/dannys_example.pdf b/mpl_examples/pylab_examples/dannys_example.pdf deleted file mode 100644 index 11a1873ff68..00000000000 Binary files a/mpl_examples/pylab_examples/dannys_example.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/dannys_example.png b/mpl_examples/pylab_examples/dannys_example.png deleted file mode 100644 index c726cb3681e..00000000000 Binary files a/mpl_examples/pylab_examples/dannys_example.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/dannys_example.py b/mpl_examples/pylab_examples/dannys_example.py deleted file mode 100644 index 8d8adb56b2f..00000000000 --- a/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/mpl_examples/pylab_examples/dash_control.hires.png b/mpl_examples/pylab_examples/dash_control.hires.png deleted file mode 100644 index ab1bb807c34..00000000000 Binary files a/mpl_examples/pylab_examples/dash_control.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/dash_control.pdf b/mpl_examples/pylab_examples/dash_control.pdf deleted file mode 100644 index 991c56da7e7..00000000000 Binary files a/mpl_examples/pylab_examples/dash_control.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/dash_control.png b/mpl_examples/pylab_examples/dash_control.png deleted file mode 100644 index 1c02e4ddc36..00000000000 Binary files a/mpl_examples/pylab_examples/dash_control.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/dash_control.py b/mpl_examples/pylab_examples/dash_control.py deleted file mode 100644 index 1100882b887..00000000000 --- a/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/mpl_examples/pylab_examples/errorbar_demo.py b/mpl_examples/pylab_examples/errorbar_demo.py deleted file mode 100644 index dbe6bdb2cd6..00000000000 --- a/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/mpl_examples/pylab_examples/errorbar_demo_00.hires.png b/mpl_examples/pylab_examples/errorbar_demo_00.hires.png deleted file mode 100644 index 2e837fb24cd..00000000000 Binary files a/mpl_examples/pylab_examples/errorbar_demo_00.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/errorbar_demo_00.pdf b/mpl_examples/pylab_examples/errorbar_demo_00.pdf deleted file mode 100644 index 673ce795dee..00000000000 Binary files a/mpl_examples/pylab_examples/errorbar_demo_00.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/errorbar_demo_00.png b/mpl_examples/pylab_examples/errorbar_demo_00.png deleted file mode 100644 index 61d8cda87b1..00000000000 Binary files a/mpl_examples/pylab_examples/errorbar_demo_00.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/errorbar_demo_01.hires.png b/mpl_examples/pylab_examples/errorbar_demo_01.hires.png deleted file mode 100644 index be35a8b08af..00000000000 Binary files a/mpl_examples/pylab_examples/errorbar_demo_01.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/errorbar_demo_01.pdf b/mpl_examples/pylab_examples/errorbar_demo_01.pdf deleted file mode 100644 index ba6c8b40f70..00000000000 Binary files a/mpl_examples/pylab_examples/errorbar_demo_01.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/errorbar_demo_01.png b/mpl_examples/pylab_examples/errorbar_demo_01.png deleted file mode 100644 index a3cc72db44b..00000000000 Binary files a/mpl_examples/pylab_examples/errorbar_demo_01.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/fill_demo.hires.png b/mpl_examples/pylab_examples/fill_demo.hires.png deleted file mode 100644 index 1585f479048..00000000000 Binary files a/mpl_examples/pylab_examples/fill_demo.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/fill_demo.pdf b/mpl_examples/pylab_examples/fill_demo.pdf deleted file mode 100644 index 3f49170f4c2..00000000000 Binary files a/mpl_examples/pylab_examples/fill_demo.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/fill_demo.png b/mpl_examples/pylab_examples/fill_demo.png deleted file mode 100644 index edd5a593236..00000000000 Binary files a/mpl_examples/pylab_examples/fill_demo.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/fill_demo.py b/mpl_examples/pylab_examples/fill_demo.py deleted file mode 100644 index 1cfded4d60c..00000000000 --- a/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/mpl_examples/pylab_examples/fill_demo2.hires.png b/mpl_examples/pylab_examples/fill_demo2.hires.png deleted file mode 100644 index fa9889f1e20..00000000000 Binary files a/mpl_examples/pylab_examples/fill_demo2.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/fill_demo2.pdf b/mpl_examples/pylab_examples/fill_demo2.pdf deleted file mode 100644 index 75a50f67c87..00000000000 Binary files a/mpl_examples/pylab_examples/fill_demo2.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/fill_demo2.png b/mpl_examples/pylab_examples/fill_demo2.png deleted file mode 100644 index 74d0161f368..00000000000 Binary files a/mpl_examples/pylab_examples/fill_demo2.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/fill_demo2.py b/mpl_examples/pylab_examples/fill_demo2.py deleted file mode 100644 index 77b86d79017..00000000000 --- a/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/mpl_examples/pylab_examples/filledmarker_demo.py b/mpl_examples/pylab_examples/filledmarker_demo.py deleted file mode 100644 index b4f001512ff..00000000000 --- a/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/mpl_examples/pylab_examples/filledmarker_demo_00.hires.png b/mpl_examples/pylab_examples/filledmarker_demo_00.hires.png deleted file mode 100644 index ce89e7ec2e1..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_00.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_00.pdf b/mpl_examples/pylab_examples/filledmarker_demo_00.pdf deleted file mode 100644 index 36be425278b..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_00.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_00.png b/mpl_examples/pylab_examples/filledmarker_demo_00.png deleted file mode 100644 index 972750d6dbb..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_00.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_01.hires.png b/mpl_examples/pylab_examples/filledmarker_demo_01.hires.png deleted file mode 100644 index 536df742039..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_01.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_01.pdf b/mpl_examples/pylab_examples/filledmarker_demo_01.pdf deleted file mode 100644 index 3ac045fc7f4..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_01.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_01.png b/mpl_examples/pylab_examples/filledmarker_demo_01.png deleted file mode 100644 index 03611a2e3a8..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_01.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_02.hires.png b/mpl_examples/pylab_examples/filledmarker_demo_02.hires.png deleted file mode 100644 index f5155d1c699..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_02.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_02.pdf b/mpl_examples/pylab_examples/filledmarker_demo_02.pdf deleted file mode 100644 index 29247048c02..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_02.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_02.png b/mpl_examples/pylab_examples/filledmarker_demo_02.png deleted file mode 100644 index 92273ddac0c..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_02.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_03.hires.png b/mpl_examples/pylab_examples/filledmarker_demo_03.hires.png deleted file mode 100644 index b8b906ad1bd..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_03.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_03.pdf b/mpl_examples/pylab_examples/filledmarker_demo_03.pdf deleted file mode 100644 index 058e6e19ac8..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_03.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_03.png b/mpl_examples/pylab_examples/filledmarker_demo_03.png deleted file mode 100644 index 9d7e20d9bcf..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_03.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_04.hires.png b/mpl_examples/pylab_examples/filledmarker_demo_04.hires.png deleted file mode 100644 index cae58d5104b..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_04.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_04.pdf b/mpl_examples/pylab_examples/filledmarker_demo_04.pdf deleted file mode 100644 index bc60acc95da..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_04.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_04.png b/mpl_examples/pylab_examples/filledmarker_demo_04.png deleted file mode 100644 index d422f28aea8..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_04.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_05.hires.png b/mpl_examples/pylab_examples/filledmarker_demo_05.hires.png deleted file mode 100644 index 49972f2a167..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_05.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_05.pdf b/mpl_examples/pylab_examples/filledmarker_demo_05.pdf deleted file mode 100644 index 9e0269331b6..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_05.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_05.png b/mpl_examples/pylab_examples/filledmarker_demo_05.png deleted file mode 100644 index e513f766add..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_05.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_06.hires.png b/mpl_examples/pylab_examples/filledmarker_demo_06.hires.png deleted file mode 100644 index 36385878d1b..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_06.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_06.pdf b/mpl_examples/pylab_examples/filledmarker_demo_06.pdf deleted file mode 100644 index 1c5a0b76ce9..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_06.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_06.png b/mpl_examples/pylab_examples/filledmarker_demo_06.png deleted file mode 100644 index 3c1467cde41..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_06.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_07.hires.png b/mpl_examples/pylab_examples/filledmarker_demo_07.hires.png deleted file mode 100644 index d5414ee40f3..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_07.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_07.pdf b/mpl_examples/pylab_examples/filledmarker_demo_07.pdf deleted file mode 100644 index 49419a7c811..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_07.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_07.png b/mpl_examples/pylab_examples/filledmarker_demo_07.png deleted file mode 100644 index e22a20ccf5f..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_07.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_08.hires.png b/mpl_examples/pylab_examples/filledmarker_demo_08.hires.png deleted file mode 100644 index 43e755dfc9e..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_08.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_08.pdf b/mpl_examples/pylab_examples/filledmarker_demo_08.pdf deleted file mode 100644 index aa3d2f975bd..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_08.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_08.png b/mpl_examples/pylab_examples/filledmarker_demo_08.png deleted file mode 100644 index ba6b73cecc7..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_08.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_09.hires.png b/mpl_examples/pylab_examples/filledmarker_demo_09.hires.png deleted file mode 100644 index d6669b99acf..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_09.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_09.pdf b/mpl_examples/pylab_examples/filledmarker_demo_09.pdf deleted file mode 100644 index 37bbc6d66fa..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_09.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_09.png b/mpl_examples/pylab_examples/filledmarker_demo_09.png deleted file mode 100644 index b2bf83a6457..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_09.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_10.hires.png b/mpl_examples/pylab_examples/filledmarker_demo_10.hires.png deleted file mode 100644 index b465d45395b..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_10.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_10.pdf b/mpl_examples/pylab_examples/filledmarker_demo_10.pdf deleted file mode 100644 index 7df8679626f..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_10.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_10.png b/mpl_examples/pylab_examples/filledmarker_demo_10.png deleted file mode 100644 index 0ccf945f7a1..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_10.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_11.hires.png b/mpl_examples/pylab_examples/filledmarker_demo_11.hires.png deleted file mode 100644 index 662b2cec348..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_11.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_11.pdf b/mpl_examples/pylab_examples/filledmarker_demo_11.pdf deleted file mode 100644 index 7d3a91aa76b..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_11.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_11.png b/mpl_examples/pylab_examples/filledmarker_demo_11.png deleted file mode 100644 index 5a083702cf1..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_11.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_12.hires.png b/mpl_examples/pylab_examples/filledmarker_demo_12.hires.png deleted file mode 100644 index 4b1cf6541db..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_12.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_12.pdf b/mpl_examples/pylab_examples/filledmarker_demo_12.pdf deleted file mode 100644 index 12dd4eb59b0..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_12.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/filledmarker_demo_12.png b/mpl_examples/pylab_examples/filledmarker_demo_12.png deleted file mode 100644 index af8de2cb495..00000000000 Binary files a/mpl_examples/pylab_examples/filledmarker_demo_12.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/griddata_demo_00_00.hires.png b/mpl_examples/pylab_examples/griddata_demo_00_00.hires.png deleted file mode 100644 index aae98e2bcf7..00000000000 Binary files a/mpl_examples/pylab_examples/griddata_demo_00_00.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/griddata_demo_00_00.pdf b/mpl_examples/pylab_examples/griddata_demo_00_00.pdf deleted file mode 100644 index 19d09c59a5b..00000000000 Binary files a/mpl_examples/pylab_examples/griddata_demo_00_00.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/griddata_demo_00_00.png b/mpl_examples/pylab_examples/griddata_demo_00_00.png deleted file mode 100644 index 25f59d236e8..00000000000 Binary files a/mpl_examples/pylab_examples/griddata_demo_00_00.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo.hires.png b/mpl_examples/pylab_examples/histogram_demo.hires.png deleted file mode 100644 index 40548d22aa3..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo.pdf b/mpl_examples/pylab_examples/histogram_demo.pdf deleted file mode 100644 index d85458622de..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo.png b/mpl_examples/pylab_examples/histogram_demo.png deleted file mode 100644 index 887220d6f03..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo.py b/mpl_examples/pylab_examples/histogram_demo.py deleted file mode 100644 index 00919f78ea6..00000000000 --- a/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/mpl_examples/pylab_examples/histogram_demo_extended.py b/mpl_examples/pylab_examples/histogram_demo_extended.py deleted file mode 100644 index bd262007edd..00000000000 --- a/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/mpl_examples/pylab_examples/histogram_demo_extended_00.hires.png b/mpl_examples/pylab_examples/histogram_demo_extended_00.hires.png deleted file mode 100644 index d068871edf4..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_00.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_00.pdf b/mpl_examples/pylab_examples/histogram_demo_extended_00.pdf deleted file mode 100644 index fd50e36ed6c..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_00.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_00.png b/mpl_examples/pylab_examples/histogram_demo_extended_00.png deleted file mode 100644 index cbcc4e43ddb..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_00.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_01.hires.png b/mpl_examples/pylab_examples/histogram_demo_extended_01.hires.png deleted file mode 100644 index 032f17e4950..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_01.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_01.pdf b/mpl_examples/pylab_examples/histogram_demo_extended_01.pdf deleted file mode 100644 index cb26f2f791f..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_01.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_01.png b/mpl_examples/pylab_examples/histogram_demo_extended_01.png deleted file mode 100644 index 3aa536ae643..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_01.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_02.hires.png b/mpl_examples/pylab_examples/histogram_demo_extended_02.hires.png deleted file mode 100644 index 7f3dd1dbb03..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_02.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_02.pdf b/mpl_examples/pylab_examples/histogram_demo_extended_02.pdf deleted file mode 100644 index b5223ede9ad..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_02.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_02.png b/mpl_examples/pylab_examples/histogram_demo_extended_02.png deleted file mode 100644 index b09df924fbc..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_02.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_03.hires.png b/mpl_examples/pylab_examples/histogram_demo_extended_03.hires.png deleted file mode 100644 index 0c2f8efc9dc..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_03.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_03.pdf b/mpl_examples/pylab_examples/histogram_demo_extended_03.pdf deleted file mode 100644 index 48424a4a60a..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_03.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_03.png b/mpl_examples/pylab_examples/histogram_demo_extended_03.png deleted file mode 100644 index a4ca1299fc5..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_03.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_04.hires.png b/mpl_examples/pylab_examples/histogram_demo_extended_04.hires.png deleted file mode 100644 index ca240221731..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_04.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_04.pdf b/mpl_examples/pylab_examples/histogram_demo_extended_04.pdf deleted file mode 100644 index baab52b9a80..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_04.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_04.png b/mpl_examples/pylab_examples/histogram_demo_extended_04.png deleted file mode 100644 index 5f3adce0898..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_04.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_05.hires.png b/mpl_examples/pylab_examples/histogram_demo_extended_05.hires.png deleted file mode 100644 index 33bc249f426..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_05.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_05.pdf b/mpl_examples/pylab_examples/histogram_demo_extended_05.pdf deleted file mode 100644 index ba4c0b57d29..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_05.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_05.png b/mpl_examples/pylab_examples/histogram_demo_extended_05.png deleted file mode 100644 index b799bf61075..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_05.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_06.hires.png b/mpl_examples/pylab_examples/histogram_demo_extended_06.hires.png deleted file mode 100644 index 8062622f1af..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_06.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_06.pdf b/mpl_examples/pylab_examples/histogram_demo_extended_06.pdf deleted file mode 100644 index 870545d1b13..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_06.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/histogram_demo_extended_06.png b/mpl_examples/pylab_examples/histogram_demo_extended_06.png deleted file mode 100644 index f6dc3d1b9d8..00000000000 Binary files a/mpl_examples/pylab_examples/histogram_demo_extended_06.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/hline_demo.hires.png b/mpl_examples/pylab_examples/hline_demo.hires.png deleted file mode 100644 index 988f18b6fb2..00000000000 Binary files a/mpl_examples/pylab_examples/hline_demo.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/hline_demo.pdf b/mpl_examples/pylab_examples/hline_demo.pdf deleted file mode 100644 index 6fe47d4504a..00000000000 Binary files a/mpl_examples/pylab_examples/hline_demo.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/hline_demo.png b/mpl_examples/pylab_examples/hline_demo.png deleted file mode 100644 index 3206f895fd3..00000000000 Binary files a/mpl_examples/pylab_examples/hline_demo.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/hline_demo.py b/mpl_examples/pylab_examples/hline_demo.py deleted file mode 100644 index 8d02cca3e8f..00000000000 --- a/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/mpl_examples/pylab_examples/image_demo3.hires.png b/mpl_examples/pylab_examples/image_demo3.hires.png deleted file mode 100644 index b3375e44e97..00000000000 Binary files a/mpl_examples/pylab_examples/image_demo3.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/image_demo3.pdf b/mpl_examples/pylab_examples/image_demo3.pdf deleted file mode 100644 index 4cc37fd9d71..00000000000 Binary files a/mpl_examples/pylab_examples/image_demo3.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/image_demo3.png b/mpl_examples/pylab_examples/image_demo3.png deleted file mode 100644 index 61d5fb84266..00000000000 Binary files a/mpl_examples/pylab_examples/image_demo3.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/image_demo3.py b/mpl_examples/pylab_examples/image_demo3.py deleted file mode 100644 index 73a7c0af98c..00000000000 --- a/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('grace_hopper.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/mpl_examples/pylab_examples/integral_demo.hires.png b/mpl_examples/pylab_examples/integral_demo.hires.png deleted file mode 100644 index 9659d6bf103..00000000000 Binary files a/mpl_examples/pylab_examples/integral_demo.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/integral_demo.pdf b/mpl_examples/pylab_examples/integral_demo.pdf deleted file mode 100644 index b81c8b0f742..00000000000 Binary files a/mpl_examples/pylab_examples/integral_demo.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/integral_demo.png b/mpl_examples/pylab_examples/integral_demo.png deleted file mode 100644 index 561b696d92c..00000000000 Binary files a/mpl_examples/pylab_examples/integral_demo.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/integral_demo.py b/mpl_examples/pylab_examples/integral_demo.py deleted file mode 100644 index 436482ce189..00000000000 --- a/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/mpl_examples/pylab_examples/legend_auto.py b/mpl_examples/pylab_examples/legend_auto.py deleted file mode 100644 index bcab13df337..00000000000 --- a/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/mpl_examples/pylab_examples/legend_auto_00.hires.png b/mpl_examples/pylab_examples/legend_auto_00.hires.png deleted file mode 100644 index bf1c4c0e1f2..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_00.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_00.pdf b/mpl_examples/pylab_examples/legend_auto_00.pdf deleted file mode 100644 index e16a7d3ef37..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_00.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_00.png b/mpl_examples/pylab_examples/legend_auto_00.png deleted file mode 100644 index 97b691d7c3c..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_00.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_01.hires.png b/mpl_examples/pylab_examples/legend_auto_01.hires.png deleted file mode 100644 index e049d6716ae..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_01.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_01.pdf b/mpl_examples/pylab_examples/legend_auto_01.pdf deleted file mode 100644 index 4bf4e056cbf..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_01.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_01.png b/mpl_examples/pylab_examples/legend_auto_01.png deleted file mode 100644 index 87da3ffb618..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_01.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_02.hires.png b/mpl_examples/pylab_examples/legend_auto_02.hires.png deleted file mode 100644 index 7e1a7997b0d..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_02.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_02.pdf b/mpl_examples/pylab_examples/legend_auto_02.pdf deleted file mode 100644 index b63de3dcd3d..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_02.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_02.png b/mpl_examples/pylab_examples/legend_auto_02.png deleted file mode 100644 index 775fb108ada..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_02.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_03.hires.png b/mpl_examples/pylab_examples/legend_auto_03.hires.png deleted file mode 100644 index a3a84f3783f..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_03.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_03.pdf b/mpl_examples/pylab_examples/legend_auto_03.pdf deleted file mode 100644 index 85c6b7881b4..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_03.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_03.png b/mpl_examples/pylab_examples/legend_auto_03.png deleted file mode 100644 index be440f0f12c..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_03.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_04.hires.png b/mpl_examples/pylab_examples/legend_auto_04.hires.png deleted file mode 100644 index c3e7eba4af3..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_04.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_04.pdf b/mpl_examples/pylab_examples/legend_auto_04.pdf deleted file mode 100644 index 46e15907de2..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_04.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_04.png b/mpl_examples/pylab_examples/legend_auto_04.png deleted file mode 100644 index a7466fa609d..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_04.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_05.hires.png b/mpl_examples/pylab_examples/legend_auto_05.hires.png deleted file mode 100644 index 42b58567dd4..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_05.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_05.pdf b/mpl_examples/pylab_examples/legend_auto_05.pdf deleted file mode 100644 index 881dd74e458..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_05.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_05.png b/mpl_examples/pylab_examples/legend_auto_05.png deleted file mode 100644 index 4c77710d340..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_05.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_06.hires.png b/mpl_examples/pylab_examples/legend_auto_06.hires.png deleted file mode 100644 index 3efb9b48989..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_06.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_06.pdf b/mpl_examples/pylab_examples/legend_auto_06.pdf deleted file mode 100644 index 024e83ef742..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_06.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_06.png b/mpl_examples/pylab_examples/legend_auto_06.png deleted file mode 100644 index 2aaecd9aaf5..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_06.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_07.hires.png b/mpl_examples/pylab_examples/legend_auto_07.hires.png deleted file mode 100644 index 674f0414c9b..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_07.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_07.pdf b/mpl_examples/pylab_examples/legend_auto_07.pdf deleted file mode 100644 index 0a7078e9810..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_07.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_07.png b/mpl_examples/pylab_examples/legend_auto_07.png deleted file mode 100644 index bf5cc55936a..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_07.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_08.hires.png b/mpl_examples/pylab_examples/legend_auto_08.hires.png deleted file mode 100644 index b93ec9e00af..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_08.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_08.pdf b/mpl_examples/pylab_examples/legend_auto_08.pdf deleted file mode 100644 index a51224bdcf1..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_08.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_08.png b/mpl_examples/pylab_examples/legend_auto_08.png deleted file mode 100644 index 146c9d05dd1..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_08.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_09.hires.png b/mpl_examples/pylab_examples/legend_auto_09.hires.png deleted file mode 100644 index c6f3b18f2bd..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_09.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_09.pdf b/mpl_examples/pylab_examples/legend_auto_09.pdf deleted file mode 100644 index 1746eafa055..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_09.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_auto_09.png b/mpl_examples/pylab_examples/legend_auto_09.png deleted file mode 100644 index 23a00bfcf92..00000000000 Binary files a/mpl_examples/pylab_examples/legend_auto_09.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_demo.hires.png b/mpl_examples/pylab_examples/legend_demo.hires.png deleted file mode 100644 index 3ed3306ae53..00000000000 Binary files a/mpl_examples/pylab_examples/legend_demo.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_demo.pdf b/mpl_examples/pylab_examples/legend_demo.pdf deleted file mode 100644 index 48a9f69023a..00000000000 Binary files a/mpl_examples/pylab_examples/legend_demo.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_demo.png b/mpl_examples/pylab_examples/legend_demo.png deleted file mode 100644 index a0527086a8d..00000000000 Binary files a/mpl_examples/pylab_examples/legend_demo.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_demo.py b/mpl_examples/pylab_examples/legend_demo.py deleted file mode 100644 index fefc97ea793..00000000000 --- a/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/mpl_examples/pylab_examples/legend_demo_custom_handler.hires.png b/mpl_examples/pylab_examples/legend_demo_custom_handler.hires.png deleted file mode 100644 index 36e914ed882..00000000000 Binary files a/mpl_examples/pylab_examples/legend_demo_custom_handler.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_demo_custom_handler.pdf b/mpl_examples/pylab_examples/legend_demo_custom_handler.pdf deleted file mode 100644 index aca2a94c532..00000000000 Binary files a/mpl_examples/pylab_examples/legend_demo_custom_handler.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_demo_custom_handler.png b/mpl_examples/pylab_examples/legend_demo_custom_handler.png deleted file mode 100644 index 1f55298a45a..00000000000 Binary files a/mpl_examples/pylab_examples/legend_demo_custom_handler.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_demo_custom_handler.py b/mpl_examples/pylab_examples/legend_demo_custom_handler.py deleted file mode 100644 index 4d5e9e59def..00000000000 --- a/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/mpl_examples/pylab_examples/legend_scatter.hires.png b/mpl_examples/pylab_examples/legend_scatter.hires.png deleted file mode 100644 index 3b0c4795a4b..00000000000 Binary files a/mpl_examples/pylab_examples/legend_scatter.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_scatter.pdf b/mpl_examples/pylab_examples/legend_scatter.pdf deleted file mode 100644 index 7e72e1a6e4f..00000000000 Binary files a/mpl_examples/pylab_examples/legend_scatter.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_scatter.png b/mpl_examples/pylab_examples/legend_scatter.png deleted file mode 100644 index 85086495cb1..00000000000 Binary files a/mpl_examples/pylab_examples/legend_scatter.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_scatter.py b/mpl_examples/pylab_examples/legend_scatter.py deleted file mode 100644 index 81eb32e37b4..00000000000 --- a/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/mpl_examples/pylab_examples/legend_translucent.hires.png b/mpl_examples/pylab_examples/legend_translucent.hires.png deleted file mode 100644 index f223f647baf..00000000000 Binary files a/mpl_examples/pylab_examples/legend_translucent.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_translucent.pdf b/mpl_examples/pylab_examples/legend_translucent.pdf deleted file mode 100644 index 40b4ab83cac..00000000000 Binary files a/mpl_examples/pylab_examples/legend_translucent.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_translucent.png b/mpl_examples/pylab_examples/legend_translucent.png deleted file mode 100644 index fa96e1afe96..00000000000 Binary files a/mpl_examples/pylab_examples/legend_translucent.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/legend_translucent.py b/mpl_examples/pylab_examples/legend_translucent.py deleted file mode 100644 index 577b0f96cfe..00000000000 --- a/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/mpl_examples/pylab_examples/line_styles.hires.png b/mpl_examples/pylab_examples/line_styles.hires.png deleted file mode 100644 index a3aa1027313..00000000000 Binary files a/mpl_examples/pylab_examples/line_styles.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/line_styles.pdf b/mpl_examples/pylab_examples/line_styles.pdf deleted file mode 100644 index c6ded80b140..00000000000 Binary files a/mpl_examples/pylab_examples/line_styles.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/line_styles.png b/mpl_examples/pylab_examples/line_styles.png deleted file mode 100644 index ae3e39015c7..00000000000 Binary files a/mpl_examples/pylab_examples/line_styles.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/line_styles.py b/mpl_examples/pylab_examples/line_styles.py deleted file mode 100644 index fdde90ee41a..00000000000 --- a/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/mpl_examples/pylab_examples/mathtext_examples.hires.png b/mpl_examples/pylab_examples/mathtext_examples.hires.png deleted file mode 100644 index 56b4b6423b4..00000000000 Binary files a/mpl_examples/pylab_examples/mathtext_examples.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/mathtext_examples.pdf b/mpl_examples/pylab_examples/mathtext_examples.pdf deleted file mode 100644 index 3bb993ff4cb..00000000000 Binary files a/mpl_examples/pylab_examples/mathtext_examples.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/mathtext_examples.png b/mpl_examples/pylab_examples/mathtext_examples.png deleted file mode 100644 index 024d61f12d4..00000000000 Binary files a/mpl_examples/pylab_examples/mathtext_examples.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/matshow_03.hires.png b/mpl_examples/pylab_examples/matshow_03.hires.png deleted file mode 100644 index 91b6ec4bc68..00000000000 Binary files a/mpl_examples/pylab_examples/matshow_03.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/matshow_03.pdf b/mpl_examples/pylab_examples/matshow_03.pdf deleted file mode 100644 index 98e18977fc7..00000000000 Binary files a/mpl_examples/pylab_examples/matshow_03.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/matshow_03.png b/mpl_examples/pylab_examples/matshow_03.png deleted file mode 100644 index 63e2578f1a0..00000000000 Binary files a/mpl_examples/pylab_examples/matshow_03.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/matshow_04.hires.png b/mpl_examples/pylab_examples/matshow_04.hires.png deleted file mode 100644 index 96277faf262..00000000000 Binary files a/mpl_examples/pylab_examples/matshow_04.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/matshow_04.pdf b/mpl_examples/pylab_examples/matshow_04.pdf deleted file mode 100644 index 2e8c3459c3f..00000000000 Binary files a/mpl_examples/pylab_examples/matshow_04.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/matshow_04.png b/mpl_examples/pylab_examples/matshow_04.png deleted file mode 100644 index b5e11b49c7c..00000000000 Binary files a/mpl_examples/pylab_examples/matshow_04.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/pcolor_demo2.hires.png b/mpl_examples/pylab_examples/pcolor_demo2.hires.png deleted file mode 100644 index 456b0aee32f..00000000000 Binary files a/mpl_examples/pylab_examples/pcolor_demo2.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/pcolor_demo2.pdf b/mpl_examples/pylab_examples/pcolor_demo2.pdf deleted file mode 100644 index 63d71e88f01..00000000000 Binary files a/mpl_examples/pylab_examples/pcolor_demo2.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/pcolor_demo2.png b/mpl_examples/pylab_examples/pcolor_demo2.png deleted file mode 100644 index 10ec4942c26..00000000000 Binary files a/mpl_examples/pylab_examples/pcolor_demo2.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/pcolor_demo2.py b/mpl_examples/pylab_examples/pcolor_demo2.py deleted file mode 100644 index f5ae2c9fa3e..00000000000 --- a/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/mpl_examples/pylab_examples/pie_demo.hires.png b/mpl_examples/pylab_examples/pie_demo.hires.png deleted file mode 100644 index 4bb48504e39..00000000000 Binary files a/mpl_examples/pylab_examples/pie_demo.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/pie_demo.pdf b/mpl_examples/pylab_examples/pie_demo.pdf deleted file mode 100644 index ea6a733c762..00000000000 Binary files a/mpl_examples/pylab_examples/pie_demo.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/pie_demo.png b/mpl_examples/pylab_examples/pie_demo.png deleted file mode 100644 index da6ab85badd..00000000000 Binary files a/mpl_examples/pylab_examples/pie_demo.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/pie_demo.py b/mpl_examples/pylab_examples/pie_demo.py deleted file mode 100644 index 0b0e9a3b8a7..00000000000 --- a/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/mpl_examples/pylab_examples/polar_bar.hires.png b/mpl_examples/pylab_examples/polar_bar.hires.png deleted file mode 100644 index e385f1a1a20..00000000000 Binary files a/mpl_examples/pylab_examples/polar_bar.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/polar_bar.pdf b/mpl_examples/pylab_examples/polar_bar.pdf deleted file mode 100644 index 20d91a5260c..00000000000 Binary files a/mpl_examples/pylab_examples/polar_bar.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/polar_bar.png b/mpl_examples/pylab_examples/polar_bar.png deleted file mode 100644 index 40b25ea676d..00000000000 Binary files a/mpl_examples/pylab_examples/polar_bar.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/polar_bar.py b/mpl_examples/pylab_examples/polar_bar.py deleted file mode 100644 index 14d8d7de0b4..00000000000 --- a/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/mpl_examples/pylab_examples/polar_scatter.hires.png b/mpl_examples/pylab_examples/polar_scatter.hires.png deleted file mode 100644 index ef5ffbc4cbc..00000000000 Binary files a/mpl_examples/pylab_examples/polar_scatter.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/polar_scatter.pdf b/mpl_examples/pylab_examples/polar_scatter.pdf deleted file mode 100644 index 3abd44aea3d..00000000000 Binary files a/mpl_examples/pylab_examples/polar_scatter.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/polar_scatter.png b/mpl_examples/pylab_examples/polar_scatter.png deleted file mode 100644 index 09ece561e72..00000000000 Binary files a/mpl_examples/pylab_examples/polar_scatter.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/polar_scatter.py b/mpl_examples/pylab_examples/polar_scatter.py deleted file mode 100644 index 196f6e84729..00000000000 --- a/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/mpl_examples/pylab_examples/poormans_contour.hires.png b/mpl_examples/pylab_examples/poormans_contour.hires.png deleted file mode 100644 index cb926b19afc..00000000000 Binary files a/mpl_examples/pylab_examples/poormans_contour.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/poormans_contour.pdf b/mpl_examples/pylab_examples/poormans_contour.pdf deleted file mode 100644 index 31be6d010d7..00000000000 Binary files a/mpl_examples/pylab_examples/poormans_contour.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/poormans_contour.png b/mpl_examples/pylab_examples/poormans_contour.png deleted file mode 100644 index 8cd13099be6..00000000000 Binary files a/mpl_examples/pylab_examples/poormans_contour.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/poormans_contour.py b/mpl_examples/pylab_examples/poormans_contour.py deleted file mode 100644 index 5a518e1a696..00000000000 --- a/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/mpl_examples/pylab_examples/psd_demo.hires.png b/mpl_examples/pylab_examples/psd_demo.hires.png deleted file mode 100644 index e21532a6601..00000000000 Binary files a/mpl_examples/pylab_examples/psd_demo.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/psd_demo.pdf b/mpl_examples/pylab_examples/psd_demo.pdf deleted file mode 100644 index 5a0633bed32..00000000000 Binary files a/mpl_examples/pylab_examples/psd_demo.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/psd_demo.png b/mpl_examples/pylab_examples/psd_demo.png deleted file mode 100644 index adee4b2c482..00000000000 Binary files a/mpl_examples/pylab_examples/psd_demo.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/scatter_demo.hires.png b/mpl_examples/pylab_examples/scatter_demo.hires.png deleted file mode 100644 index cddb795f3fe..00000000000 Binary files a/mpl_examples/pylab_examples/scatter_demo.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/scatter_demo.pdf b/mpl_examples/pylab_examples/scatter_demo.pdf deleted file mode 100644 index ad25ee6ba9c..00000000000 Binary files a/mpl_examples/pylab_examples/scatter_demo.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/scatter_demo.png b/mpl_examples/pylab_examples/scatter_demo.png deleted file mode 100644 index 69c213efa57..00000000000 Binary files a/mpl_examples/pylab_examples/scatter_demo.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/scatter_demo.py b/mpl_examples/pylab_examples/scatter_demo.py deleted file mode 100644 index 3adf52b1dd1..00000000000 --- a/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/mpl_examples/pylab_examples/shading_example.hires.png b/mpl_examples/pylab_examples/shading_example.hires.png deleted file mode 100644 index 685fffe75d2..00000000000 Binary files a/mpl_examples/pylab_examples/shading_example.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/shading_example.pdf b/mpl_examples/pylab_examples/shading_example.pdf deleted file mode 100644 index ebcccec5ee7..00000000000 Binary files a/mpl_examples/pylab_examples/shading_example.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/shading_example.png b/mpl_examples/pylab_examples/shading_example.png deleted file mode 100644 index 76f24772314..00000000000 Binary files a/mpl_examples/pylab_examples/shading_example.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/show_colormaps.hires.png b/mpl_examples/pylab_examples/show_colormaps.hires.png deleted file mode 100644 index 5936dd51921..00000000000 Binary files a/mpl_examples/pylab_examples/show_colormaps.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/show_colormaps.pdf b/mpl_examples/pylab_examples/show_colormaps.pdf deleted file mode 100644 index afe98a5fe6c..00000000000 Binary files a/mpl_examples/pylab_examples/show_colormaps.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/show_colormaps.png b/mpl_examples/pylab_examples/show_colormaps.png deleted file mode 100644 index 7c89b75b945..00000000000 Binary files a/mpl_examples/pylab_examples/show_colormaps.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/show_colormaps.py b/mpl_examples/pylab_examples/show_colormaps.py deleted file mode 100644 index 0146a93c07e..00000000000 --- a/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/mpl_examples/pylab_examples/spine_placement_demo_02.hires.png b/mpl_examples/pylab_examples/spine_placement_demo_02.hires.png deleted file mode 100644 index 5d2c12932b0..00000000000 Binary files a/mpl_examples/pylab_examples/spine_placement_demo_02.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/spine_placement_demo_02.pdf b/mpl_examples/pylab_examples/spine_placement_demo_02.pdf deleted file mode 100644 index a556949f629..00000000000 Binary files a/mpl_examples/pylab_examples/spine_placement_demo_02.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/spine_placement_demo_02.png b/mpl_examples/pylab_examples/spine_placement_demo_02.png deleted file mode 100644 index b0156c6e9a0..00000000000 Binary files a/mpl_examples/pylab_examples/spine_placement_demo_02.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/spine_placement_demo_03.hires.png b/mpl_examples/pylab_examples/spine_placement_demo_03.hires.png deleted file mode 100644 index 01c7ec265a1..00000000000 Binary files a/mpl_examples/pylab_examples/spine_placement_demo_03.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/spine_placement_demo_03.pdf b/mpl_examples/pylab_examples/spine_placement_demo_03.pdf deleted file mode 100644 index 642f7b8b82d..00000000000 Binary files a/mpl_examples/pylab_examples/spine_placement_demo_03.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/spine_placement_demo_03.png b/mpl_examples/pylab_examples/spine_placement_demo_03.png deleted file mode 100644 index 92a1e469281..00000000000 Binary files a/mpl_examples/pylab_examples/spine_placement_demo_03.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/stix_fonts_demo.hires.png b/mpl_examples/pylab_examples/stix_fonts_demo.hires.png deleted file mode 100644 index 03fd3246f68..00000000000 Binary files a/mpl_examples/pylab_examples/stix_fonts_demo.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/stix_fonts_demo.pdf b/mpl_examples/pylab_examples/stix_fonts_demo.pdf deleted file mode 100644 index 18b8b653f09..00000000000 Binary files a/mpl_examples/pylab_examples/stix_fonts_demo.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/stix_fonts_demo.png b/mpl_examples/pylab_examples/stix_fonts_demo.png deleted file mode 100644 index 547a0afd137..00000000000 Binary files a/mpl_examples/pylab_examples/stix_fonts_demo.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/streamplot_demo.py b/mpl_examples/pylab_examples/streamplot_demo.py deleted file mode 100644 index f67e3515c90..00000000000 --- a/mpl_examples/pylab_examples/streamplot_demo.py +++ /dev/null @@ -1,19 +0,0 @@ -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/mpl_examples/pylab_examples/streamplot_demo_00.hires.png b/mpl_examples/pylab_examples/streamplot_demo_00.hires.png deleted file mode 100644 index e240cdd1f35..00000000000 Binary files a/mpl_examples/pylab_examples/streamplot_demo_00.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/streamplot_demo_00.pdf b/mpl_examples/pylab_examples/streamplot_demo_00.pdf deleted file mode 100644 index 53877d1b741..00000000000 Binary files a/mpl_examples/pylab_examples/streamplot_demo_00.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/streamplot_demo_00.png b/mpl_examples/pylab_examples/streamplot_demo_00.png deleted file mode 100644 index 4623062bf8b..00000000000 Binary files a/mpl_examples/pylab_examples/streamplot_demo_00.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/streamplot_demo_01.hires.png b/mpl_examples/pylab_examples/streamplot_demo_01.hires.png deleted file mode 100644 index 135cd83aa29..00000000000 Binary files a/mpl_examples/pylab_examples/streamplot_demo_01.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/streamplot_demo_01.pdf b/mpl_examples/pylab_examples/streamplot_demo_01.pdf deleted file mode 100644 index d01de37930d..00000000000 Binary files a/mpl_examples/pylab_examples/streamplot_demo_01.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/streamplot_demo_01.png b/mpl_examples/pylab_examples/streamplot_demo_01.png deleted file mode 100644 index 9edeeee9fc7..00000000000 Binary files a/mpl_examples/pylab_examples/streamplot_demo_01.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/streamplot_with_mask.hires.png b/mpl_examples/pylab_examples/streamplot_with_mask.hires.png deleted file mode 100644 index 05ab36a0883..00000000000 Binary files a/mpl_examples/pylab_examples/streamplot_with_mask.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/streamplot_with_mask.pdf b/mpl_examples/pylab_examples/streamplot_with_mask.pdf deleted file mode 100644 index 3498f94a903..00000000000 Binary files a/mpl_examples/pylab_examples/streamplot_with_mask.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/streamplot_with_mask.png b/mpl_examples/pylab_examples/streamplot_with_mask.png deleted file mode 100644 index 718737b4c31..00000000000 Binary files a/mpl_examples/pylab_examples/streamplot_with_mask.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/streamplot_with_mask.py b/mpl_examples/pylab_examples/streamplot_with_mask.py deleted file mode 100644 index c989b006062..00000000000 --- a/mpl_examples/pylab_examples/streamplot_with_mask.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -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() - diff --git a/mpl_examples/pylab_examples/text_themes.hires.png b/mpl_examples/pylab_examples/text_themes.hires.png deleted file mode 100644 index 4b27c329cd4..00000000000 Binary files a/mpl_examples/pylab_examples/text_themes.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/text_themes.pdf b/mpl_examples/pylab_examples/text_themes.pdf deleted file mode 100644 index e992dcf9a73..00000000000 Binary files a/mpl_examples/pylab_examples/text_themes.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/text_themes.png b/mpl_examples/pylab_examples/text_themes.png deleted file mode 100644 index d9508fd8cf7..00000000000 Binary files a/mpl_examples/pylab_examples/text_themes.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/text_themes.py b/mpl_examples/pylab_examples/text_themes.py deleted file mode 100644 index 43dfc39064f..00000000000 --- a/mpl_examples/pylab_examples/text_themes.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/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() diff --git a/mpl_examples/pylab_examples/to_numeric.hires.png b/mpl_examples/pylab_examples/to_numeric.hires.png deleted file mode 100644 index a5a9fedcd45..00000000000 Binary files a/mpl_examples/pylab_examples/to_numeric.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/to_numeric.pdf b/mpl_examples/pylab_examples/to_numeric.pdf deleted file mode 100644 index 2dd734e173a..00000000000 Binary files a/mpl_examples/pylab_examples/to_numeric.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/to_numeric.png b/mpl_examples/pylab_examples/to_numeric.png deleted file mode 100644 index 4049e6fac20..00000000000 Binary files a/mpl_examples/pylab_examples/to_numeric.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/to_numeric.py b/mpl_examples/pylab_examples/to_numeric.py deleted file mode 100644 index eaac80ed8ec..00000000000 --- a/mpl_examples/pylab_examples/to_numeric.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/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 it to Pillow 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) - -# Uncomment this line to display the image using ImageMagick's -# `display` tool. -# im.show() diff --git a/mpl_examples/pylab_examples/unicode_demo.hires.png b/mpl_examples/pylab_examples/unicode_demo.hires.png deleted file mode 100644 index 696e6141e80..00000000000 Binary files a/mpl_examples/pylab_examples/unicode_demo.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/unicode_demo.pdf b/mpl_examples/pylab_examples/unicode_demo.pdf deleted file mode 100644 index c84746323ac..00000000000 Binary files a/mpl_examples/pylab_examples/unicode_demo.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/unicode_demo.png b/mpl_examples/pylab_examples/unicode_demo.png deleted file mode 100644 index 86e8651c18f..00000000000 Binary files a/mpl_examples/pylab_examples/unicode_demo.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/unicode_demo.py b/mpl_examples/pylab_examples/unicode_demo.py deleted file mode 100644 index bba623482a2..00000000000 --- a/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/mpl_examples/pylab_examples/vertical_ticklabels.hires.png b/mpl_examples/pylab_examples/vertical_ticklabels.hires.png deleted file mode 100644 index fa488f3485c..00000000000 Binary files a/mpl_examples/pylab_examples/vertical_ticklabels.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/vertical_ticklabels.pdf b/mpl_examples/pylab_examples/vertical_ticklabels.pdf deleted file mode 100644 index ef11b33247c..00000000000 Binary files a/mpl_examples/pylab_examples/vertical_ticklabels.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/vertical_ticklabels.png b/mpl_examples/pylab_examples/vertical_ticklabels.png deleted file mode 100644 index 960f2ad9f7c..00000000000 Binary files a/mpl_examples/pylab_examples/vertical_ticklabels.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/vertical_ticklabels.py b/mpl_examples/pylab_examples/vertical_ticklabels.py deleted file mode 100644 index 2416a785bfc..00000000000 --- a/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/mpl_examples/pylab_examples/vline_demo.hires.png b/mpl_examples/pylab_examples/vline_demo.hires.png deleted file mode 100644 index 56d3623651d..00000000000 Binary files a/mpl_examples/pylab_examples/vline_demo.hires.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/vline_demo.pdf b/mpl_examples/pylab_examples/vline_demo.pdf deleted file mode 100644 index d65d8f5dfac..00000000000 Binary files a/mpl_examples/pylab_examples/vline_demo.pdf and /dev/null differ diff --git a/mpl_examples/pylab_examples/vline_demo.png b/mpl_examples/pylab_examples/vline_demo.png deleted file mode 100644 index 7aacb828bcf..00000000000 Binary files a/mpl_examples/pylab_examples/vline_demo.png and /dev/null differ diff --git a/mpl_examples/pylab_examples/vline_demo.py b/mpl_examples/pylab_examples/vline_demo.py deleted file mode 100644 index 98b512f50ae..00000000000 --- a/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/plot_directive/inline/021ac4abb7.hires.png b/plot_directive/inline/021ac4abb7.hires.png deleted file mode 100644 index da2c0b3f38a..00000000000 Binary files a/plot_directive/inline/021ac4abb7.hires.png and /dev/null differ diff --git a/plot_directive/inline/021ac4abb7.pdf b/plot_directive/inline/021ac4abb7.pdf deleted file mode 100644 index 88d4800c3ae..00000000000 Binary files a/plot_directive/inline/021ac4abb7.pdf and /dev/null differ diff --git a/plot_directive/inline/1b82c44202.hires.png b/plot_directive/inline/1b82c44202.hires.png deleted file mode 100644 index 92d3e7fcfcb..00000000000 Binary files a/plot_directive/inline/1b82c44202.hires.png and /dev/null differ diff --git a/plot_directive/inline/1b82c44202.pdf b/plot_directive/inline/1b82c44202.pdf deleted file mode 100644 index da574abd548..00000000000 Binary files a/plot_directive/inline/1b82c44202.pdf and /dev/null differ diff --git a/plot_directive/inline/338da66ea0.hires.png b/plot_directive/inline/338da66ea0.hires.png deleted file mode 100644 index 4a7a4183d85..00000000000 Binary files a/plot_directive/inline/338da66ea0.hires.png and /dev/null differ diff --git a/plot_directive/inline/338da66ea0.pdf b/plot_directive/inline/338da66ea0.pdf deleted file mode 100644 index 9e85c03c9f8..00000000000 Binary files a/plot_directive/inline/338da66ea0.pdf and /dev/null differ diff --git a/plot_directive/inline/419f78d190.hires.png b/plot_directive/inline/419f78d190.hires.png deleted file mode 100644 index bb6c137528a..00000000000 Binary files a/plot_directive/inline/419f78d190.hires.png and /dev/null differ diff --git a/plot_directive/inline/419f78d190.pdf b/plot_directive/inline/419f78d190.pdf deleted file mode 100644 index d10c61266d1..00000000000 Binary files a/plot_directive/inline/419f78d190.pdf and /dev/null differ diff --git a/plot_directive/inline/47efe6d94f.hires.png b/plot_directive/inline/47efe6d94f.hires.png deleted file mode 100644 index 70c5d434a28..00000000000 Binary files a/plot_directive/inline/47efe6d94f.hires.png and /dev/null differ diff --git a/plot_directive/inline/47efe6d94f.pdf b/plot_directive/inline/47efe6d94f.pdf deleted file mode 100644 index 97795184fe6..00000000000 Binary files a/plot_directive/inline/47efe6d94f.pdf and /dev/null differ diff --git a/plot_directive/inline/4c05f08060.hires.png b/plot_directive/inline/4c05f08060.hires.png deleted file mode 100644 index fa0afefe678..00000000000 Binary files a/plot_directive/inline/4c05f08060.hires.png and /dev/null differ diff --git a/plot_directive/inline/4c05f08060.pdf b/plot_directive/inline/4c05f08060.pdf deleted file mode 100644 index 75fb354e685..00000000000 Binary files a/plot_directive/inline/4c05f08060.pdf and /dev/null differ diff --git a/plot_directive/inline/4eef60adf8.hires.png b/plot_directive/inline/4eef60adf8.hires.png deleted file mode 100644 index 0f9dcafe76d..00000000000 Binary files a/plot_directive/inline/4eef60adf8.hires.png and /dev/null differ diff --git a/plot_directive/inline/4eef60adf8.pdf b/plot_directive/inline/4eef60adf8.pdf deleted file mode 100644 index d8a3445e115..00000000000 Binary files a/plot_directive/inline/4eef60adf8.pdf and /dev/null differ diff --git a/plot_directive/inline/57359382a8.hires.png b/plot_directive/inline/57359382a8.hires.png deleted file mode 100644 index 6cdb71f087c..00000000000 Binary files a/plot_directive/inline/57359382a8.hires.png and /dev/null differ diff --git a/plot_directive/inline/57359382a8.pdf b/plot_directive/inline/57359382a8.pdf deleted file mode 100644 index d110378eb2a..00000000000 Binary files a/plot_directive/inline/57359382a8.pdf and /dev/null differ diff --git a/plot_directive/inline/620eaf140f.hires.png b/plot_directive/inline/620eaf140f.hires.png deleted file mode 100644 index 5dcd95b60b0..00000000000 Binary files a/plot_directive/inline/620eaf140f.hires.png and /dev/null differ diff --git a/plot_directive/inline/620eaf140f.pdf b/plot_directive/inline/620eaf140f.pdf deleted file mode 100644 index bd55ae77402..00000000000 Binary files a/plot_directive/inline/620eaf140f.pdf and /dev/null differ diff --git a/plot_directive/inline/6c35a17565.hires.png b/plot_directive/inline/6c35a17565.hires.png deleted file mode 100644 index 4e3d5dd9b49..00000000000 Binary files a/plot_directive/inline/6c35a17565.hires.png and /dev/null differ diff --git a/plot_directive/inline/6c35a17565.pdf b/plot_directive/inline/6c35a17565.pdf deleted file mode 100644 index 34536d7a391..00000000000 Binary files a/plot_directive/inline/6c35a17565.pdf and /dev/null differ diff --git a/plot_directive/inline/701028ca64.hires.png b/plot_directive/inline/701028ca64.hires.png deleted file mode 100644 index 137c770e571..00000000000 Binary files a/plot_directive/inline/701028ca64.hires.png and /dev/null differ diff --git a/plot_directive/inline/701028ca64.pdf b/plot_directive/inline/701028ca64.pdf deleted file mode 100644 index 05bcf3b9d2d..00000000000 Binary files a/plot_directive/inline/701028ca64.pdf and /dev/null differ diff --git a/plot_directive/inline/752c3d3a86.hires.png b/plot_directive/inline/752c3d3a86.hires.png deleted file mode 100644 index 30bdfd828d2..00000000000 Binary files a/plot_directive/inline/752c3d3a86.hires.png and /dev/null differ diff --git a/plot_directive/inline/752c3d3a86.pdf b/plot_directive/inline/752c3d3a86.pdf deleted file mode 100644 index ff13306ffbe..00000000000 Binary files a/plot_directive/inline/752c3d3a86.pdf and /dev/null differ diff --git a/plot_directive/inline/7aec218cee.hires.png b/plot_directive/inline/7aec218cee.hires.png deleted file mode 100644 index 18505a0dcd9..00000000000 Binary files a/plot_directive/inline/7aec218cee.hires.png and /dev/null differ diff --git a/plot_directive/inline/7aec218cee.pdf b/plot_directive/inline/7aec218cee.pdf deleted file mode 100644 index e403c3f093b..00000000000 Binary files a/plot_directive/inline/7aec218cee.pdf and /dev/null differ diff --git a/plot_directive/inline/85391b58a8.hires.png b/plot_directive/inline/85391b58a8.hires.png deleted file mode 100644 index 95929b0d029..00000000000 Binary files a/plot_directive/inline/85391b58a8.hires.png and /dev/null differ diff --git a/plot_directive/inline/85391b58a8.pdf b/plot_directive/inline/85391b58a8.pdf deleted file mode 100644 index ad3dddd49ec..00000000000 Binary files a/plot_directive/inline/85391b58a8.pdf and /dev/null differ diff --git a/plot_directive/inline/86cbd17f31.hires.png b/plot_directive/inline/86cbd17f31.hires.png deleted file mode 100644 index bcc516567de..00000000000 Binary files a/plot_directive/inline/86cbd17f31.hires.png and /dev/null differ diff --git a/plot_directive/inline/86cbd17f31.pdf b/plot_directive/inline/86cbd17f31.pdf deleted file mode 100644 index c864f48eb5b..00000000000 Binary files a/plot_directive/inline/86cbd17f31.pdf and /dev/null differ diff --git a/plot_directive/inline/93bc6c3f0e.hires.png b/plot_directive/inline/93bc6c3f0e.hires.png deleted file mode 100644 index 750292c76d4..00000000000 Binary files a/plot_directive/inline/93bc6c3f0e.hires.png and /dev/null differ diff --git a/plot_directive/inline/93bc6c3f0e.pdf b/plot_directive/inline/93bc6c3f0e.pdf deleted file mode 100644 index c83699d747b..00000000000 Binary files a/plot_directive/inline/93bc6c3f0e.pdf and /dev/null differ diff --git a/plot_directive/inline/9933a7e1e5.hires.png b/plot_directive/inline/9933a7e1e5.hires.png deleted file mode 100644 index e7c19fb4413..00000000000 Binary files a/plot_directive/inline/9933a7e1e5.hires.png and /dev/null differ diff --git a/plot_directive/inline/9933a7e1e5.pdf b/plot_directive/inline/9933a7e1e5.pdf deleted file mode 100644 index 80515196f0f..00000000000 Binary files a/plot_directive/inline/9933a7e1e5.pdf and /dev/null differ diff --git a/plot_directive/inline/9f2e84e526.hires.png b/plot_directive/inline/9f2e84e526.hires.png deleted file mode 100644 index 7ec77fd229a..00000000000 Binary files a/plot_directive/inline/9f2e84e526.hires.png and /dev/null differ diff --git a/plot_directive/inline/9f2e84e526.pdf b/plot_directive/inline/9f2e84e526.pdf deleted file mode 100644 index 2d5deab17a4..00000000000 Binary files a/plot_directive/inline/9f2e84e526.pdf and /dev/null differ diff --git a/plot_directive/inline/afb29ca921.hires.png b/plot_directive/inline/afb29ca921.hires.png deleted file mode 100644 index ddcce6e5f02..00000000000 Binary files a/plot_directive/inline/afb29ca921.hires.png and /dev/null differ diff --git a/plot_directive/inline/afb29ca921.pdf b/plot_directive/inline/afb29ca921.pdf deleted file mode 100644 index a3323e1945e..00000000000 Binary files a/plot_directive/inline/afb29ca921.pdf and /dev/null differ diff --git a/plot_directive/inline/bd04b58f72.hires.png b/plot_directive/inline/bd04b58f72.hires.png deleted file mode 100644 index 74c32c2277c..00000000000 Binary files a/plot_directive/inline/bd04b58f72.hires.png and /dev/null differ diff --git a/plot_directive/inline/bd04b58f72.pdf b/plot_directive/inline/bd04b58f72.pdf deleted file mode 100644 index 04fed4e6698..00000000000 Binary files a/plot_directive/inline/bd04b58f72.pdf and /dev/null differ diff --git a/plot_directive/inline/c097cdcada.hires.png b/plot_directive/inline/c097cdcada.hires.png deleted file mode 100644 index beadc6e8421..00000000000 Binary files a/plot_directive/inline/c097cdcada.hires.png and /dev/null differ diff --git a/plot_directive/inline/c097cdcada.pdf b/plot_directive/inline/c097cdcada.pdf deleted file mode 100644 index 11c1af714e0..00000000000 Binary files a/plot_directive/inline/c097cdcada.pdf and /dev/null differ diff --git a/plot_directive/inline/e1e2e3079d.hires.png b/plot_directive/inline/e1e2e3079d.hires.png deleted file mode 100644 index 5bc0bb2a8d3..00000000000 Binary files a/plot_directive/inline/e1e2e3079d.hires.png and /dev/null differ diff --git a/plot_directive/inline/e1e2e3079d.pdf b/plot_directive/inline/e1e2e3079d.pdf deleted file mode 100644 index fdd7fff4973..00000000000 Binary files a/plot_directive/inline/e1e2e3079d.pdf and /dev/null differ diff --git a/plot_directive/inline/eb02a08e3c.hires.png b/plot_directive/inline/eb02a08e3c.hires.png deleted file mode 100644 index b3364ffebd6..00000000000 Binary files a/plot_directive/inline/eb02a08e3c.hires.png and /dev/null differ diff --git a/plot_directive/inline/eb02a08e3c.pdf b/plot_directive/inline/eb02a08e3c.pdf deleted file mode 100644 index 40863c68ab0..00000000000 Binary files a/plot_directive/inline/eb02a08e3c.pdf and /dev/null differ diff --git a/plot_directive/inline/f04cf46a56.hires.png b/plot_directive/inline/f04cf46a56.hires.png deleted file mode 100644 index 84bef72e2bb..00000000000 Binary files a/plot_directive/inline/f04cf46a56.hires.png and /dev/null differ diff --git a/plot_directive/inline/f04cf46a56.pdf b/plot_directive/inline/f04cf46a56.pdf deleted file mode 100644 index 389cc5dbeb3..00000000000 Binary files a/plot_directive/inline/f04cf46a56.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/artist_demo.hires.png b/plot_directive/mpl_examples/api/artist_demo.hires.png deleted file mode 100644 index 65b6a6b7214..00000000000 Binary files a/plot_directive/mpl_examples/api/artist_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/artist_demo.pdf b/plot_directive/mpl_examples/api/artist_demo.pdf deleted file mode 100644 index 5ec62e95229..00000000000 Binary files a/plot_directive/mpl_examples/api/artist_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/artist_demo.py b/plot_directive/mpl_examples/api/artist_demo.py deleted file mode 100644 index 128e6d352f1..00000000000 --- a/plot_directive/mpl_examples/api/artist_demo.py +++ /dev/null @@ -1,119 +0,0 @@ -""" -Show examples of matplotlib artists -http://matplotlib.sourceforge.net/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.sourceforge.net/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/plot_directive/mpl_examples/api/barchart_demo.hires.png b/plot_directive/mpl_examples/api/barchart_demo.hires.png deleted file mode 100644 index 242cc79d3e0..00000000000 Binary files a/plot_directive/mpl_examples/api/barchart_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/barchart_demo.pdf b/plot_directive/mpl_examples/api/barchart_demo.pdf deleted file mode 100644 index 3c0b3751c22..00000000000 Binary files a/plot_directive/mpl_examples/api/barchart_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/barchart_demo.py b/plot_directive/mpl_examples/api/barchart_demo.py deleted file mode 100644 index 2c3468a4762..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/api/bbox_intersect.hires.png b/plot_directive/mpl_examples/api/bbox_intersect.hires.png deleted file mode 100644 index 118b7af13b7..00000000000 Binary files a/plot_directive/mpl_examples/api/bbox_intersect.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/bbox_intersect.pdf b/plot_directive/mpl_examples/api/bbox_intersect.pdf deleted file mode 100644 index 18546bce1df..00000000000 Binary files a/plot_directive/mpl_examples/api/bbox_intersect.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/bbox_intersect.py b/plot_directive/mpl_examples/api/bbox_intersect.py deleted file mode 100644 index 7bf134c62c0..00000000000 --- a/plot_directive/mpl_examples/api/bbox_intersect.py +++ /dev/null @@ -1,21 +0,0 @@ -from pylab import * -import numpy as np -from matplotlib.transforms import Bbox -from matplotlib.path import Path -from matplotlib.patches import Rectangle - -rect = Rectangle((-1, -1), 2, 2, facecolor="#aaaaaa") -gca().add_patch(rect) -bbox = Bbox.from_bounds(-1, -1, 2, 2) - -for i in range(12): - vertices = (np.random.random((4, 2)) - 0.5) * 6.0 - vertices = np.ma.masked_array(vertices, [[False, False], [True, True], [False, False], [False, False]]) - path = Path(vertices) - if path.intersects_bbox(bbox): - color = 'r' - else: - color = 'b' - plot(vertices[:,0], vertices[:,1], color=color) - -show() diff --git a/plot_directive/mpl_examples/api/clippath_demo.hires.png b/plot_directive/mpl_examples/api/clippath_demo.hires.png deleted file mode 100644 index a3cdaef5a64..00000000000 Binary files a/plot_directive/mpl_examples/api/clippath_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/clippath_demo.pdf b/plot_directive/mpl_examples/api/clippath_demo.pdf deleted file mode 100644 index 13eb2856fe8..00000000000 Binary files a/plot_directive/mpl_examples/api/clippath_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/clippath_demo.py b/plot_directive/mpl_examples/api/clippath_demo.py deleted file mode 100644 index 8191c144fe7..00000000000 --- a/plot_directive/mpl_examples/api/clippath_demo.py +++ /dev/null @@ -1,20 +0,0 @@ -""" -Clipping to arbitrary patches and paths -""" -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.path as path -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/plot_directive/mpl_examples/api/collections_demo.hires.png b/plot_directive/mpl_examples/api/collections_demo.hires.png deleted file mode 100644 index 9845de98e97..00000000000 Binary files a/plot_directive/mpl_examples/api/collections_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/collections_demo.pdf b/plot_directive/mpl_examples/api/collections_demo.pdf deleted file mode 100644 index a722d637f5b..00000000000 Binary files a/plot_directive/mpl_examples/api/collections_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/collections_demo.py b/plot_directive/mpl_examples/api/collections_demo.py deleted file mode 100644 index b4dbf61dab7..00000000000 --- a/plot_directive/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 P -from matplotlib import collections, axes, transforms -from matplotlib.colors import colorConverter -import numpy as N - -nverts = 50 -npts = 100 - -# Make some spirals -r = N.array(range(nverts)) -theta = N.array(range(nverts)) * (2*N.pi)/(nverts-1) -xx = r * N.sin(theta) -yy = r * N.cos(theta) -spiral = zip(xx,yy) - -# Make some offsets -rs = N.random.RandomState([12345678]) -xo = rs.randn(npts) -yo = rs.randn(npts) -xyo = 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 = P.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 = N.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 = N.linspace(0, 2*N.pi, nverts) -ym = N.amax(yy) -xx = (0.2 + (ym-yy)/ym)**2 * N.cos(yy-0.4) * 0.5 -segs = [] -for i in range(ncurves): - xxx = xx + 0.02*rs.randn(nverts) - curve = 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]) - - -P.show() - - diff --git a/plot_directive/mpl_examples/api/color_cycle.hires.png b/plot_directive/mpl_examples/api/color_cycle.hires.png deleted file mode 100644 index 824471cde50..00000000000 Binary files a/plot_directive/mpl_examples/api/color_cycle.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/color_cycle.pdf b/plot_directive/mpl_examples/api/color_cycle.pdf deleted file mode 100644 index 2357f9a685e..00000000000 Binary files a/plot_directive/mpl_examples/api/color_cycle.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/color_cycle.py b/plot_directive/mpl_examples/api/color_cycle.py deleted file mode 100644 index 6b2abe873cd..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/api/colorbar_only.hires.png b/plot_directive/mpl_examples/api/colorbar_only.hires.png deleted file mode 100644 index 650a2b808b7..00000000000 Binary files a/plot_directive/mpl_examples/api/colorbar_only.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/colorbar_only.pdf b/plot_directive/mpl_examples/api/colorbar_only.pdf deleted file mode 100644 index f439303176a..00000000000 Binary files a/plot_directive/mpl_examples/api/colorbar_only.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/colorbar_only.py b/plot_directive/mpl_examples/api/colorbar_only.py deleted file mode 100644 index e071e1b4a15..00000000000 --- a/plot_directive/mpl_examples/api/colorbar_only.py +++ /dev/null @@ -1,51 +0,0 @@ -''' -Make a colorbar as a separate figure. -''' - -from matplotlib import pyplot, mpl - -# Make a figure and axes with dimensions as desired. -fig = pyplot.figure(figsize=(8,3)) -ax1 = fig.add_axes([0.05, 0.65, 0.9, 0.15]) -ax2 = fig.add_axes([0.05, 0.25, 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') - -pyplot.show() - diff --git a/plot_directive/mpl_examples/api/compound_path.hires.png b/plot_directive/mpl_examples/api/compound_path.hires.png deleted file mode 100644 index 8492f77dd5e..00000000000 Binary files a/plot_directive/mpl_examples/api/compound_path.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/compound_path.pdf b/plot_directive/mpl_examples/api/compound_path.pdf deleted file mode 100644 index ffea5b5872c..00000000000 Binary files a/plot_directive/mpl_examples/api/compound_path.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/compound_path.py b/plot_directive/mpl_examples/api/compound_path.py deleted file mode 100644 index 3155010954b..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/api/custom_projection_example.hires.png b/plot_directive/mpl_examples/api/custom_projection_example.hires.png deleted file mode 100644 index 62fd771be86..00000000000 Binary files a/plot_directive/mpl_examples/api/custom_projection_example.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/custom_projection_example.pdf b/plot_directive/mpl_examples/api/custom_projection_example.pdf deleted file mode 100644 index a598ab41485..00000000000 Binary files a/plot_directive/mpl_examples/api/custom_projection_example.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/custom_projection_example.py b/plot_directive/mpl_examples/api/custom_projection_example.py deleted file mode 100644 index 777f4374653..00000000000 --- a/plot_directive/mpl_examples/api/custom_projection_example.py +++ /dev/null @@ -1,456 +0,0 @@ -from matplotlib.axes import Axes -from matplotlib import cbook -from matplotlib.patches import Circle -from matplotlib.path import Path -from matplotlib.ticker import Formatter, Locator, NullLocator, FixedLocator, NullFormatter -from matplotlib.transforms import Affine2D, Affine2DBase, Bbox, \ - BboxTransformTo, IdentityTransform, Transform, TransformWrapper -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='hammer')``. - name = '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 {'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, long, 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. - """ - long = long * (180.0 / np.pi) - lat = lat * (180.0 / np.pi) - if lat >= 0.0: - ns = 'N' - else: - ns = 'S' - if long >= 0.0: - ew = 'E' - else: - ew = 'W' - # \u00b0 : degree symbol - return u'%f\u00b0%s, %f\u00b0%s' % (abs(lat), ns, abs(long), 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 u"%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( - 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(self, ll): - """ - Override the transform 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(self, path): - vertices = path.vertices - ipath = path.interpolated(path._interpolation_steps) - return Path(self.transform(ipath.vertices), ipath.codes) - - 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(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.__doc__ = Transform.transform.__doc__ - - 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) - -# Now make a simple example using the custom projection. -from pylab import * - -subplot(111, projection="hammer") -p = plot([-1, 1, 1], [-1, -1, 1], "o-") -grid(True) - -show() diff --git a/plot_directive/mpl_examples/api/custom_scale_example.hires.png b/plot_directive/mpl_examples/api/custom_scale_example.hires.png deleted file mode 100644 index b9dbd0976c9..00000000000 Binary files a/plot_directive/mpl_examples/api/custom_scale_example.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/custom_scale_example.pdf b/plot_directive/mpl_examples/api/custom_scale_example.pdf deleted file mode 100644 index e7674a1df8e..00000000000 Binary files a/plot_directive/mpl_examples/api/custom_scale_example.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/custom_scale_example.py b/plot_directive/mpl_examples/api/custom_scale_example.py deleted file mode 100644 index d7700fdd81e..00000000000 --- a/plot_directive/mpl_examples/api/custom_scale_example.py +++ /dev/null @@ -1,165 +0,0 @@ -from matplotlib import scale as mscale -from matplotlib import transforms as mtransforms - -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 u"%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(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(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) - -from pylab import * -import numpy as np - -t = arange(-180.0, 180.0, 0.1) -s = t / 360.0 * np.pi - -plot(t, s, '-', lw=2) -gca().set_yscale('mercator') - -xlabel('Longitude') -ylabel('Latitude') -title('Mercator: Projection of the Oppressor') -grid(True) - -show() diff --git a/plot_directive/mpl_examples/api/date_demo.hires.png b/plot_directive/mpl_examples/api/date_demo.hires.png deleted file mode 100644 index e9fc41b50d0..00000000000 Binary files a/plot_directive/mpl_examples/api/date_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/date_demo.pdf b/plot_directive/mpl_examples/api/date_demo.pdf deleted file mode 100644 index 34d367f5556..00000000000 Binary files a/plot_directive/mpl_examples/api/date_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/date_demo.py b/plot_directive/mpl_examples/api/date_demo.py deleted file mode 100644 index 8729e2d5839..00000000000 --- a/plot_directive/mpl_examples/api/date_demo.py +++ /dev/null @@ -1,57 +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 -import matplotlib.pyplot as plt -import matplotlib.dates as mdates -import matplotlib.mlab as mlab -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/plot_directive/mpl_examples/api/date_index_formatter.py b/plot_directive/mpl_examples/api/date_index_formatter.py deleted file mode 100644 index 4eb2429741f..00000000000 --- a/plot_directive/mpl_examples/api/date_index_formatter.py +++ /dev/null @@ -1,40 +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 -""" -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', 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/plot_directive/mpl_examples/api/date_index_formatter_00.hires.png b/plot_directive/mpl_examples/api/date_index_formatter_00.hires.png deleted file mode 100644 index 79980e19c51..00000000000 Binary files a/plot_directive/mpl_examples/api/date_index_formatter_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/date_index_formatter_00.pdf b/plot_directive/mpl_examples/api/date_index_formatter_00.pdf deleted file mode 100644 index dd9f421eced..00000000000 Binary files a/plot_directive/mpl_examples/api/date_index_formatter_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/date_index_formatter_01.hires.png b/plot_directive/mpl_examples/api/date_index_formatter_01.hires.png deleted file mode 100644 index 0076e0c1c49..00000000000 Binary files a/plot_directive/mpl_examples/api/date_index_formatter_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/date_index_formatter_01.pdf b/plot_directive/mpl_examples/api/date_index_formatter_01.pdf deleted file mode 100644 index 545bd85abaa..00000000000 Binary files a/plot_directive/mpl_examples/api/date_index_formatter_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/demo_affine_image.hires.png b/plot_directive/mpl_examples/api/demo_affine_image.hires.png deleted file mode 100644 index 9384df206d1..00000000000 Binary files a/plot_directive/mpl_examples/api/demo_affine_image.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/demo_affine_image.pdf b/plot_directive/mpl_examples/api/demo_affine_image.pdf deleted file mode 100644 index f351ddca470..00000000000 Binary files a/plot_directive/mpl_examples/api/demo_affine_image.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/demo_affine_image.py b/plot_directive/mpl_examples/api/demo_affine_image.py deleted file mode 100644 index f95f0d12a11..00000000000 --- a/plot_directive/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='nearest', 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='nearest', 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/plot_directive/mpl_examples/api/donut_demo.hires.png b/plot_directive/mpl_examples/api/donut_demo.hires.png deleted file mode 100644 index b75c688db8a..00000000000 Binary files a/plot_directive/mpl_examples/api/donut_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/donut_demo.pdf b/plot_directive/mpl_examples/api/donut_demo.pdf deleted file mode 100644 index 17897c2a64f..00000000000 Binary files a/plot_directive/mpl_examples/api/donut_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/donut_demo.py b/plot_directive/mpl_examples/api/donut_demo.py deleted file mode 100644 index 4bc56b1be88..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/api/engineering_formatter.hires.png b/plot_directive/mpl_examples/api/engineering_formatter.hires.png deleted file mode 100644 index 329ebe8d29e..00000000000 Binary files a/plot_directive/mpl_examples/api/engineering_formatter.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/engineering_formatter.pdf b/plot_directive/mpl_examples/api/engineering_formatter.pdf deleted file mode 100644 index 1d3d3e6674e..00000000000 Binary files a/plot_directive/mpl_examples/api/engineering_formatter.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/engineering_formatter.py b/plot_directive/mpl_examples/api/engineering_formatter.py deleted file mode 100644 index a71f5e23045..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/api/fahrenheit_celcius_scales.hires.png b/plot_directive/mpl_examples/api/fahrenheit_celcius_scales.hires.png deleted file mode 100644 index 46223e210cb..00000000000 Binary files a/plot_directive/mpl_examples/api/fahrenheit_celcius_scales.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/fahrenheit_celcius_scales.pdf b/plot_directive/mpl_examples/api/fahrenheit_celcius_scales.pdf deleted file mode 100644 index 9a6e5695361..00000000000 Binary files a/plot_directive/mpl_examples/api/fahrenheit_celcius_scales.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/fahrenheit_celcius_scales.py b/plot_directive/mpl_examples/api/fahrenheit_celcius_scales.py deleted file mode 100644 index 2a10441683e..00000000000 --- a/plot_directive/mpl_examples/api/fahrenheit_celcius_scales.py +++ /dev/null @@ -1,28 +0,0 @@ -""" -Shoiw how to display two scales on the left and right y axis -- Fahrenheit and Celcius -""" - -import matplotlib.pyplot as plt - -fig = plt.figure() -ax1 = fig.add_subplot(111) # the Fahrenheit scale -ax2 = ax1.twinx() # the Celcius scale - -def Tc(Tf): - return (5./9.)*(Tf-32) - - -def update_ax2(ax1): - y1, y2 = ax1.get_ylim() - ax2.set_ylim(Tc(y1), Tc(y2)) - ax2.figure.canvas.draw() - -# automatically update ylim of ax2 when ylim of ax1 changes. -ax1.callbacks.connect("ylim_changed", update_ax2) -ax1.plot([78, 79, 79, 77]) - -ax1.set_title('Two scales: Fahrenheit and Celcius') -ax1.set_ylabel('Fahrenheit') -ax2.set_ylabel('Celcius') - -plt.show() diff --git a/plot_directive/mpl_examples/api/hinton_demo.py b/plot_directive/mpl_examples/api/hinton_demo.py deleted file mode 100644 index 700e13c1bb6..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/api/histogram_demo.hires.png b/plot_directive/mpl_examples/api/histogram_demo.hires.png deleted file mode 100644 index 0bfc0752f4f..00000000000 Binary files a/plot_directive/mpl_examples/api/histogram_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/histogram_demo.pdf b/plot_directive/mpl_examples/api/histogram_demo.pdf deleted file mode 100644 index f672bfdd05d..00000000000 Binary files a/plot_directive/mpl_examples/api/histogram_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/histogram_demo.py b/plot_directive/mpl_examples/api/histogram_demo.py deleted file mode 100644 index 11c4b0adaba..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/api/histogram_path_demo.hires.png b/plot_directive/mpl_examples/api/histogram_path_demo.hires.png deleted file mode 100644 index cb6d51a0b6c..00000000000 Binary files a/plot_directive/mpl_examples/api/histogram_path_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/histogram_path_demo.pdf b/plot_directive/mpl_examples/api/histogram_path_demo.pdf deleted file mode 100644 index 464e80e1df6..00000000000 Binary files a/plot_directive/mpl_examples/api/histogram_path_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/histogram_path_demo.py b/plot_directive/mpl_examples/api/histogram_path_demo.py deleted file mode 100644 index 9b21b509d80..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/api/image_zcoord.hires.png b/plot_directive/mpl_examples/api/image_zcoord.hires.png deleted file mode 100644 index a95f54bbc37..00000000000 Binary files a/plot_directive/mpl_examples/api/image_zcoord.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/image_zcoord.pdf b/plot_directive/mpl_examples/api/image_zcoord.pdf deleted file mode 100644 index 311833edb19..00000000000 Binary files a/plot_directive/mpl_examples/api/image_zcoord.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/image_zcoord.py b/plot_directive/mpl_examples/api/image_zcoord.py deleted file mode 100644 index 170f8df5e5b..00000000000 --- a/plot_directive/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') -ax.set_ylabel('Message length --->') -ax.set_title('Minimum Message Length') - -ax.set_yticklabels([]) -ax.set_xticklabels([]) - -# set some legend properties. All the code below is optional. The -# defaults are usually sensible but if you need more control, this -# shows you how - -# the matplotlib.patches.Rectangle instance surrounding the legend -frame = leg.get_frame() -frame.set_facecolor('0.80') # set the frame face color to light gray - -# matplotlib.text.Text instances -for t in leg.get_texts(): - t.set_fontsize('small') # the legend text fontsize - -# matplotlib.lines.Line2D instances -for l in leg.get_lines(): - l.set_linewidth(1.5) # the legend line width -plt.show() - - - diff --git a/plot_directive/mpl_examples/api/line_with_text.hires.png b/plot_directive/mpl_examples/api/line_with_text.hires.png deleted file mode 100644 index 46d3804546f..00000000000 Binary files a/plot_directive/mpl_examples/api/line_with_text.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/line_with_text.pdf b/plot_directive/mpl_examples/api/line_with_text.pdf deleted file mode 100644 index 5692de4738e..00000000000 Binary files a/plot_directive/mpl_examples/api/line_with_text.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/line_with_text.py b/plot_directive/mpl_examples/api/line_with_text.py deleted file mode 100644 index 87be46d43ed..00000000000 --- a/plot_directive/mpl_examples/api/line_with_text.py +++ /dev/null @@ -1,65 +0,0 @@ -""" -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() diff --git a/plot_directive/mpl_examples/api/logo2.hires.png b/plot_directive/mpl_examples/api/logo2.hires.png deleted file mode 100644 index a48045aa9ae..00000000000 Binary files a/plot_directive/mpl_examples/api/logo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/logo2.pdf b/plot_directive/mpl_examples/api/logo2.pdf deleted file mode 100644 index 5f779740906..00000000000 Binary files a/plot_directive/mpl_examples/api/logo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/logo2.py b/plot_directive/mpl_examples/api/logo2.py deleted file mode 100644 index 457200dafd8..00000000000 --- a/plot_directive/mpl_examples/api/logo2.py +++ /dev/null @@ -1,83 +0,0 @@ -""" -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 -import matplotlib.mlab as mlab -from pylab import rand - -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, resolution=50) - - - 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/plot_directive/mpl_examples/api/mathtext_asarray.hires.png b/plot_directive/mpl_examples/api/mathtext_asarray.hires.png deleted file mode 100644 index ed7123ad762..00000000000 Binary files a/plot_directive/mpl_examples/api/mathtext_asarray.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/mathtext_asarray.pdf b/plot_directive/mpl_examples/api/mathtext_asarray.pdf deleted file mode 100644 index 67487785f52..00000000000 Binary files a/plot_directive/mpl_examples/api/mathtext_asarray.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/mathtext_asarray.py b/plot_directive/mpl_examples/api/mathtext_asarray.py deleted file mode 100644 index 049184ffa57..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/api/patch_collection.hires.png b/plot_directive/mpl_examples/api/patch_collection.hires.png deleted file mode 100644 index 6d6ad73f858..00000000000 Binary files a/plot_directive/mpl_examples/api/patch_collection.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/patch_collection.pdf b/plot_directive/mpl_examples/api/patch_collection.pdf deleted file mode 100644 index 39f53a43d22..00000000000 Binary files a/plot_directive/mpl_examples/api/patch_collection.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/patch_collection.py b/plot_directive/mpl_examples/api/patch_collection.py deleted file mode 100644 index 293ccef3934..00000000000 --- a/plot_directive/mpl_examples/api/patch_collection.py +++ /dev/null @@ -1,46 +0,0 @@ -import matplotlib -from matplotlib.patches import Circle, Wedge, Polygon -from matplotlib.collections import PatchCollection -import pylab - -fig=pylab.figure() -ax=fig.add_subplot(111) - -resolution = 50 # the number of vertices -N = 3 -x = pylab.rand(N) -y = pylab.rand(N) -radii = 0.1*pylab.rand(N) -patches = [] -for x1,y1,r in zip(x, y, radii): - circle = Circle((x1,y1), r) - patches.append(circle) - -x = pylab.rand(N) -y = pylab.rand(N) -radii = 0.1*pylab.rand(N) -theta1 = 360.0*pylab.rand(N) -theta2 = 360.0*pylab.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(pylab.rand(N,2), True) - patches.append(polygon) - -colors = 100*pylab.rand(len(patches)) -p = PatchCollection(patches, cmap=matplotlib.cm.jet, alpha=0.4) -p.set_array(pylab.array(colors)) -ax.add_collection(p) -pylab.colorbar(p) - -pylab.show() diff --git a/plot_directive/mpl_examples/api/path_patch_demo.hires.png b/plot_directive/mpl_examples/api/path_patch_demo.hires.png deleted file mode 100644 index fff0eb94d57..00000000000 Binary files a/plot_directive/mpl_examples/api/path_patch_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/path_patch_demo.pdf b/plot_directive/mpl_examples/api/path_patch_demo.pdf deleted file mode 100644 index ba248c83db8..00000000000 Binary files a/plot_directive/mpl_examples/api/path_patch_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/path_patch_demo.py b/plot_directive/mpl_examples/api/path_patch_demo.py deleted file mode 100644 index d28fa2c3701..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/api/quad_bezier.hires.png b/plot_directive/mpl_examples/api/quad_bezier.hires.png deleted file mode 100644 index ab580370441..00000000000 Binary files a/plot_directive/mpl_examples/api/quad_bezier.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/quad_bezier.pdf b/plot_directive/mpl_examples/api/quad_bezier.pdf deleted file mode 100644 index 0b08fbedcb7..00000000000 Binary files a/plot_directive/mpl_examples/api/quad_bezier.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/quad_bezier.py b/plot_directive/mpl_examples/api/quad_bezier.py deleted file mode 100644 index f1ab74eea2a..00000000000 --- a/plot_directive/mpl_examples/api/quad_bezier.py +++ /dev/null @@ -1,19 +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() \ No newline at end of file diff --git a/plot_directive/mpl_examples/api/radar_chart.py b/plot_directive/mpl_examples/api/radar_chart.py deleted file mode 100644 index 5c985fa1530..00000000000 --- a/plot_directive/mpl_examples/api/radar_chart.py +++ /dev/null @@ -1,144 +0,0 @@ -import numpy as np - -import matplotlib.pyplot as plt -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.""" - # 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_frame(self, x0, y0, r): - # TODO: use transforms to convert (x, y) to (r, theta) - verts = [(r*np.cos(t) + x0, r*np.sin(t) + y0) for t in theta] - return plt.Polygon(verts, closed=True, edgecolor='k') - - def draw_circle_frame(self, x0, y0, r): - return plt.Circle((x0, y0), r) - - frame_dict = {'polygon': draw_poly_frame, 'circle': draw_circle_frame} - if frame not in frame_dict: - raise ValueError, 'unknown value for `frame`: %s' % frame - - class RadarAxes(PolarAxes): - """Class for creating a radar chart (a.k.a. a spider or star chart) - - http://en.wikipedia.org/wiki/Radar_chart - """ - name = 'radar' - # use 1 line segment to connect specified points - RESOLUTION = 1 - # define draw_frame method - draw_frame = frame_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): - x0, y0 = (0.5, 0.5) - r = 0.5 - return self.draw_frame(x0, y0, r) - - register_projection(RadarAxes) - return theta - - -if __name__ == '__main__': - #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... - N = 9 - theta = radar_factory(N) - spoke_labels = ['Sulfate', 'Nitrate', 'EC', 'OC1', 'OC2', 'OC3', 'OP', 'CO', - 'O3'] - f1_base = [0.88, 0.01, 0.03, 0.03, 0.00, 0.06, 0.01, 0.00, 0.00] - f1_CO = [0.88, 0.02, 0.02, 0.02, 0.00, 0.05, 0.00, 0.05, 0.00] - f1_O3 = [0.89, 0.01, 0.07, 0.00, 0.00, 0.05, 0.00, 0.00, 0.03] - f1_both = [0.87, 0.01, 0.08, 0.00, 0.00, 0.04, 0.00, 0.00, 0.01] - - f2_base = [0.07, 0.95, 0.04, 0.05, 0.00, 0.02, 0.01, 0.00, 0.00] - f2_CO = [0.08, 0.94, 0.04, 0.02, 0.00, 0.01, 0.12, 0.04, 0.00] - f2_O3 = [0.07, 0.95, 0.05, 0.04, 0.00, 0.02, 0.12, 0.00, 0.00] - f2_both = [0.09, 0.95, 0.02, 0.03, 0.00, 0.01, 0.13, 0.06, 0.00] - - f3_base = [0.01, 0.02, 0.85, 0.19, 0.05, 0.10, 0.00, 0.00, 0.00] - f3_CO = [0.01, 0.01, 0.79, 0.10, 0.00, 0.05, 0.00, 0.31, 0.00] - f3_O3 = [0.01, 0.02, 0.86, 0.27, 0.16, 0.19, 0.00, 0.00, 0.00] - f3_both = [0.01, 0.02, 0.71, 0.24, 0.13, 0.16, 0.00, 0.50, 0.00] - - f4_base = [0.02, 0.01, 0.07, 0.01, 0.21, 0.12, 0.98, 0.00, 0.00] - f4_CO = [0.00, 0.02, 0.03, 0.38, 0.31, 0.31, 0.00, 0.59, 0.00] - f4_O3 = [0.01, 0.03, 0.00, 0.32, 0.29, 0.27, 0.00, 0.00, 0.95] - f4_both = [0.01, 0.03, 0.00, 0.28, 0.24, 0.23, 0.00, 0.44, 0.88] - - f5_base = [0.01, 0.01, 0.02, 0.71, 0.74, 0.70, 0.00, 0.00, 0.00] - f5_CO = [0.02, 0.02, 0.11, 0.47, 0.69, 0.58, 0.88, 0.00, 0.00] - f5_O3 = [0.02, 0.00, 0.03, 0.37, 0.56, 0.47, 0.87, 0.00, 0.00] - f5_both = [0.02, 0.00, 0.18, 0.45, 0.64, 0.55, 0.86, 0.00, 0.16] - - fig = plt.figure(figsize=(9,9)) - # adjust spacing around the subplots - fig.subplots_adjust(wspace=0.25, hspace=0.20, top=0.85, bottom=0.05) - title_list = ['Basecase', 'With CO', 'With O3', 'CO & O3'] - data = {'Basecase': [f1_base, f2_base, f3_base, f4_base, f5_base], - 'With CO': [f1_CO, f2_CO, f3_CO, f4_CO, f5_CO], - 'With O3': [f1_O3, f2_O3, f3_O3, f4_O3, f5_O3], - 'CO & O3': [f1_both, f2_both, f3_both, f4_both, f5_both]} - colors = ['b', 'r', 'g', 'm', 'y'] - # chemicals range from 0 to 1 - radial_grid = [0.2, 0.4, 0.6, 0.8] - # If you don't care about the order, you can loop over data_dict.items() - for n, title in enumerate(title_list): - ax = fig.add_subplot(2, 2, n+1, projection='radar') - plt.rgrids(radial_grid) - 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/plot_directive/mpl_examples/api/sankey_demo.py b/plot_directive/mpl_examples/api/sankey_demo.py deleted file mode 100644 index c10243e4849..00000000000 --- a/plot_directive/mpl_examples/api/sankey_demo.py +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/env python - -__author__ = "Yannick Copin " -__version__ = "Time-stamp: <10/02/2010 16:49 ycopin@lyopc548.in2p3.fr>" - -import numpy as N - -def sankey(ax, - outputs=[100.], outlabels=None, - inputs=[100.], inlabels='', - dx=40, dy=10, outangle=45, w=3, inangle=30, offset=2, **kwargs): - """Draw a Sankey diagram. - - outputs: array of outputs, should sum up to 100% - outlabels: output labels (same length as outputs), - or None (use default labels) or '' (no labels) - inputs and inlabels: similar for inputs - dx: horizontal elongation - dy: vertical elongation - outangle: output arrow angle [deg] - w: output arrow shoulder - inangle: input dip angle - offset: text offset - **kwargs: propagated to Patch (e.g. fill=False) - - Return (patch,[intexts,outtexts]).""" - - import matplotlib.patches as mpatches - from matplotlib.path import Path - - outs = N.absolute(outputs) - outsigns = N.sign(outputs) - outsigns[-1] = 0 # Last output - - ins = N.absolute(inputs) - insigns = N.sign(inputs) - insigns[0] = 0 # First input - - assert sum(outs)==100, "Outputs don't sum up to 100%" - assert sum(ins)==100, "Inputs don't sum up to 100%" - - def add_output(path, loss, sign=1): - h = (loss/2+w)*N.tan(outangle/180.*N.pi) # Arrow tip height - move,(x,y) = path[-1] # Use last point as reference - if sign==0: # Final loss (horizontal) - path.extend([(Path.LINETO,[x+dx,y]), - (Path.LINETO,[x+dx,y+w]), - (Path.LINETO,[x+dx+h,y-loss/2]), # Tip - (Path.LINETO,[x+dx,y-loss-w]), - (Path.LINETO,[x+dx,y-loss])]) - outtips.append((sign,path[-3][1])) - else: # Intermediate loss (vertical) - path.extend([(Path.CURVE4,[x+dx/2,y]), - (Path.CURVE4,[x+dx,y]), - (Path.CURVE4,[x+dx,y+sign*dy]), - (Path.LINETO,[x+dx-w,y+sign*dy]), - (Path.LINETO,[x+dx+loss/2,y+sign*(dy+h)]), # Tip - (Path.LINETO,[x+dx+loss+w,y+sign*dy]), - (Path.LINETO,[x+dx+loss,y+sign*dy]), - (Path.CURVE3,[x+dx+loss,y-sign*loss]), - (Path.CURVE3,[x+dx/2+loss,y-sign*loss])]) - outtips.append((sign,path[-5][1])) - - def add_input(path, gain, sign=1): - h = (gain/2)*N.tan(inangle/180.*N.pi) # Dip depth - move,(x,y) = path[-1] # Use last point as reference - if sign==0: # First gain (horizontal) - path.extend([(Path.LINETO,[x-dx,y]), - (Path.LINETO,[x-dx+h,y+gain/2]), # Dip - (Path.LINETO,[x-dx,y+gain])]) - xd,yd = path[-2][1] # Dip position - indips.append((sign,[xd-h,yd])) - else: # Intermediate gain (vertical) - path.extend([(Path.CURVE4,[x-dx/2,y]), - (Path.CURVE4,[x-dx,y]), - (Path.CURVE4,[x-dx,y+sign*dy]), - (Path.LINETO,[x-dx-gain/2,y+sign*(dy-h)]), # Dip - (Path.LINETO,[x-dx-gain,y+sign*dy]), - (Path.CURVE3,[x-dx-gain,y-sign*gain]), - (Path.CURVE3,[x-dx/2-gain,y-sign*gain])]) - xd,yd = path[-4][1] # Dip position - indips.append((sign,[xd,yd+sign*h])) - - outtips = [] # Output arrow tip dir. and positions - urpath = [(Path.MOVETO,[0,100])] # 1st point of upper right path - lrpath = [(Path.LINETO,[0,0])] # 1st point of lower right path - for loss,sign in zip(outs,outsigns): - add_output(sign>=0 and urpath or lrpath, loss, sign=sign) - - indips = [] # Input arrow tip dir. and positions - llpath = [(Path.LINETO,[0,0])] # 1st point of lower left path - ulpath = [(Path.MOVETO,[0,100])] # 1st point of upper left path - for gain,sign in zip(ins,insigns)[::-1]: - add_input(sign<=0 and llpath or ulpath, gain, sign=sign) - - def revert(path): - """A path is not just revertable by path[::-1] because of Bezier - curves.""" - rpath = [] - nextmove = Path.LINETO - for move,pos in path[::-1]: - rpath.append((nextmove,pos)) - nextmove = move - return rpath - - # Concatenate subpathes in correct order - path = urpath + revert(lrpath) + llpath + revert(ulpath) - - codes,verts = zip(*path) - verts = N.array(verts) - - # Path patch - path = Path(verts,codes) - patch = mpatches.PathPatch(path, **kwargs) - ax.add_patch(patch) - - if False: # DEBUG - print "urpath", urpath - print "lrpath", revert(lrpath) - print "llpath", llpath - print "ulpath", revert(ulpath) - - xs,ys = zip(*verts) - ax.plot(xs,ys,'go-') - - # Labels - - def set_labels(labels,values): - """Set or check labels according to values.""" - if labels=='': # No labels - return labels - elif labels is None: # Default labels - return [ '%2d%%' % val for val in values ] - else: - assert len(labels)==len(values) - return labels - - def put_labels(labels,positions,output=True): - """Put labels to positions.""" - texts = [] - lbls = output and labels or labels[::-1] - for i,label in enumerate(lbls): - s,(x,y) = positions[i] # Label direction and position - if s==0: - t = ax.text(x+offset,y,label, - ha=output and 'left' or 'right', va='center') - elif s>0: - t = ax.text(x,y+offset,label, ha='center', va='bottom') - else: - t = ax.text(x,y-offset,label, ha='center', va='top') - texts.append(t) - return texts - - outlabels = set_labels(outlabels, outs) - outtexts = put_labels(outlabels, outtips, output=True) - - inlabels = set_labels(inlabels, ins) - intexts = put_labels(inlabels, indips, output=False) - - # Axes management - ax.set_xlim(verts[:,0].min()-dx, verts[:,0].max()+dx) - ax.set_ylim(verts[:,1].min()-dy, verts[:,1].max()+dy) - ax.set_aspect('equal', adjustable='datalim') - - return patch,[intexts,outtexts] - -if __name__=='__main__': - - import matplotlib.pyplot as P - - outputs = [10.,-20.,5.,15.,-10.,40.] - outlabels = ['First','Second','Third','Fourth','Fifth','Hurray!'] - outlabels = [ s+'\n%d%%' % abs(l) for l,s in zip(outputs,outlabels) ] - - inputs = [60.,-25.,15.] - - fig = P.figure() - ax = fig.add_subplot(1,1,1, xticks=[],yticks=[], - title="Sankey diagram" - ) - - patch,(intexts,outtexts) = sankey(ax, outputs=outputs, outlabels=outlabels, - inputs=inputs, inlabels=None, - fc='g', alpha=0.2) - outtexts[1].set_color('r') - outtexts[-1].set_fontweight('bold') - - P.show() diff --git a/plot_directive/mpl_examples/api/scatter_piecharts.hires.png b/plot_directive/mpl_examples/api/scatter_piecharts.hires.png deleted file mode 100644 index 85b73855e93..00000000000 Binary files a/plot_directive/mpl_examples/api/scatter_piecharts.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/scatter_piecharts.pdf b/plot_directive/mpl_examples/api/scatter_piecharts.pdf deleted file mode 100644 index 4a491fd4cd4..00000000000 Binary files a/plot_directive/mpl_examples/api/scatter_piecharts.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/scatter_piecharts.py b/plot_directive/mpl_examples/api/scatter_piecharts.py deleted file mode 100644 index 89bbb515a09..00000000000 --- a/plot_directive/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 = 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 = 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 = 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/plot_directive/mpl_examples/api/span_regions.hires.png b/plot_directive/mpl_examples/api/span_regions.hires.png deleted file mode 100644 index 22153a68eae..00000000000 Binary files a/plot_directive/mpl_examples/api/span_regions.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/span_regions.pdf b/plot_directive/mpl_examples/api/span_regions.pdf deleted file mode 100644 index c491ea7897d..00000000000 Binary files a/plot_directive/mpl_examples/api/span_regions.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/span_regions.py b/plot_directive/mpl_examples/api/span_regions.py deleted file mode 100644 index 7acc223e170..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/api/thumbnails/artist_demo.png b/plot_directive/mpl_examples/api/thumbnails/artist_demo.png deleted file mode 100644 index 5ad16cbd78a..00000000000 Binary files a/plot_directive/mpl_examples/api/thumbnails/artist_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/thumbnails/clippath_demo.png b/plot_directive/mpl_examples/api/thumbnails/clippath_demo.png deleted file mode 100644 index 49fbcd2dcc4..00000000000 Binary files a/plot_directive/mpl_examples/api/thumbnails/clippath_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/thumbnails/color_cycle.png b/plot_directive/mpl_examples/api/thumbnails/color_cycle.png deleted file mode 100644 index d74d204a6d3..00000000000 Binary files a/plot_directive/mpl_examples/api/thumbnails/color_cycle.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/thumbnails/demo_affine_image.png b/plot_directive/mpl_examples/api/thumbnails/demo_affine_image.png deleted file mode 100644 index 377f6b9882f..00000000000 Binary files a/plot_directive/mpl_examples/api/thumbnails/demo_affine_image.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/thumbnails/fahrenheit_celcius_scales.png b/plot_directive/mpl_examples/api/thumbnails/fahrenheit_celcius_scales.png deleted file mode 100644 index 82a5fc0a738..00000000000 Binary files a/plot_directive/mpl_examples/api/thumbnails/fahrenheit_celcius_scales.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/thumbnails/fahrenheit_celsius_scales.png b/plot_directive/mpl_examples/api/thumbnails/fahrenheit_celsius_scales.png deleted file mode 100644 index b55d401a789..00000000000 Binary files a/plot_directive/mpl_examples/api/thumbnails/fahrenheit_celsius_scales.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/thumbnails/hinton_demo.png b/plot_directive/mpl_examples/api/thumbnails/hinton_demo.png deleted file mode 100644 index 77d16fc8ad8..00000000000 Binary files a/plot_directive/mpl_examples/api/thumbnails/hinton_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/thumbnails/histogram_demo.png b/plot_directive/mpl_examples/api/thumbnails/histogram_demo.png deleted file mode 100644 index 6a1c5ec1423..00000000000 Binary files a/plot_directive/mpl_examples/api/thumbnails/histogram_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/thumbnails/path_patch_demo.png b/plot_directive/mpl_examples/api/thumbnails/path_patch_demo.png deleted file mode 100644 index 61947f24f33..00000000000 Binary files a/plot_directive/mpl_examples/api/thumbnails/path_patch_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/two_scales.hires.png b/plot_directive/mpl_examples/api/two_scales.hires.png deleted file mode 100644 index 52dcfbde1b8..00000000000 Binary files a/plot_directive/mpl_examples/api/two_scales.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/two_scales.pdf b/plot_directive/mpl_examples/api/two_scales.pdf deleted file mode 100644 index 84181267cf7..00000000000 Binary files a/plot_directive/mpl_examples/api/two_scales.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/two_scales.py b/plot_directive/mpl_examples/api/two_scales.py deleted file mode 100644 index 475f3ac666f..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/api/unicode_minus.hires.png b/plot_directive/mpl_examples/api/unicode_minus.hires.png deleted file mode 100644 index 22546db8f27..00000000000 Binary files a/plot_directive/mpl_examples/api/unicode_minus.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/unicode_minus.pdf b/plot_directive/mpl_examples/api/unicode_minus.pdf deleted file mode 100644 index f341cfb4fcf..00000000000 Binary files a/plot_directive/mpl_examples/api/unicode_minus.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/unicode_minus.py b/plot_directive/mpl_examples/api/unicode_minus.py deleted file mode 100644 index 5fc35266899..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/api/watermark_image.hires.png b/plot_directive/mpl_examples/api/watermark_image.hires.png deleted file mode 100644 index 892c58bb337..00000000000 Binary files a/plot_directive/mpl_examples/api/watermark_image.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/watermark_image.pdf b/plot_directive/mpl_examples/api/watermark_image.pdf deleted file mode 100644 index d1c310eaf70..00000000000 Binary files a/plot_directive/mpl_examples/api/watermark_image.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/watermark_image.py b/plot_directive/mpl_examples/api/watermark_image.py deleted file mode 100644 index 7affe16f057..00000000000 --- a/plot_directive/mpl_examples/api/watermark_image.py +++ /dev/null @@ -1,22 +0,0 @@ -""" -Use a PNG file as a watermark -""" -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', 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/plot_directive/mpl_examples/api/watermark_text.hires.png b/plot_directive/mpl_examples/api/watermark_text.hires.png deleted file mode 100644 index b0d90606d59..00000000000 Binary files a/plot_directive/mpl_examples/api/watermark_text.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/api/watermark_text.pdf b/plot_directive/mpl_examples/api/watermark_text.pdf deleted file mode 100644 index 2844ce41713..00000000000 Binary files a/plot_directive/mpl_examples/api/watermark_text.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/api/watermark_text.py b/plot_directive/mpl_examples/api/watermark_text.py deleted file mode 100644 index 7d87de10003..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/demo_axes_divider.hires.png b/plot_directive/mpl_examples/axes_grid/demo_axes_divider.hires.png deleted file mode 100644 index 1efa1240f04..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_axes_divider.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_axes_divider.pdf b/plot_directive/mpl_examples/axes_grid/demo_axes_divider.pdf deleted file mode 100644 index f897e07a98f..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_axes_divider.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_axes_divider.py b/plot_directive/mpl_examples/axes_grid/demo_axes_divider.py deleted file mode 100644 index c40d8dac3e0..00000000000 --- a/plot_directive/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 coloarbar - 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 sied with fixed padding. - - ax = fig1.add_subplot(2, 2, 4) - demo_images_side_by_sied(ax) - - plt.draw() - plt.show() - - -demo() diff --git a/plot_directive/mpl_examples/axes_grid/demo_axes_grid.hires.png b/plot_directive/mpl_examples/axes_grid/demo_axes_grid.hires.png deleted file mode 100644 index 8325f9793a8..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_axes_grid.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_axes_grid.pdf b/plot_directive/mpl_examples/axes_grid/demo_axes_grid.pdf deleted file mode 100644 index 93ffb317773..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_axes_grid.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_axes_grid.py b/plot_directive/mpl_examples/axes_grid/demo_axes_grid.py deleted file mode 100644 index f6232d5ef3c..00000000000 --- a/plot_directive/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 labeld. - """ - 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 colobar - """ - 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 colobar. - """ - - 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/plot_directive/mpl_examples/axes_grid/demo_axes_grid2.hires.png b/plot_directive/mpl_examples/axes_grid/demo_axes_grid2.hires.png deleted file mode 100644 index 2f3ef241abd..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_axes_grid2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_axes_grid2.pdf b/plot_directive/mpl_examples/axes_grid/demo_axes_grid2.pdf deleted file mode 100644 index 7a13c1ea09a..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_axes_grid2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_axes_grid2.py b/plot_directive/mpl_examples/axes_grid/demo_axes_grid2.py deleted file mode 100644 index 9fa682ab8e1..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/demo_axes_rgb.py b/plot_directive/mpl_examples/axes_grid/demo_axes_rgb.py deleted file mode 100644 index 08c704c08ed..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/demo_axes_rgb_00.hires.png b/plot_directive/mpl_examples/axes_grid/demo_axes_rgb_00.hires.png deleted file mode 100644 index 4a77bea31ae..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_axes_rgb_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_axes_rgb_00.pdf b/plot_directive/mpl_examples/axes_grid/demo_axes_rgb_00.pdf deleted file mode 100644 index 259f00b758a..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_axes_rgb_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_axes_rgb_01.hires.png b/plot_directive/mpl_examples/axes_grid/demo_axes_rgb_01.hires.png deleted file mode 100644 index 705d36e3fc6..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_axes_rgb_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_axes_rgb_01.pdf b/plot_directive/mpl_examples/axes_grid/demo_axes_rgb_01.pdf deleted file mode 100644 index fe7e3d7e495..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_axes_rgb_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_axisline_style.hires.png b/plot_directive/mpl_examples/axes_grid/demo_axisline_style.hires.png deleted file mode 100644 index 595def16b73..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_axisline_style.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_axisline_style.pdf b/plot_directive/mpl_examples/axes_grid/demo_axisline_style.pdf deleted file mode 100644 index ae3259e9aa5..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_axisline_style.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_axisline_style.py b/plot_directive/mpl_examples/axes_grid/demo_axisline_style.py deleted file mode 100644 index 3d0b0d6f5da..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.hires.png b/plot_directive/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.hires.png deleted file mode 100644 index 594f23622c0..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.pdf b/plot_directive/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.pdf deleted file mode 100644 index 593bdbd801a..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.py b/plot_directive/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.py deleted file mode 100644 index bc5cd79cfc6..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid.hires.png b/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid.hires.png deleted file mode 100644 index 5e94578189d..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid.pdf b/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid.pdf deleted file mode 100644 index fbc121aac76..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid.py b/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid.py deleted file mode 100644 index 1a738b50d71..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid2.hires.png b/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid2.hires.png deleted file mode 100644 index f7cae4bf3c9..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid2.pdf b/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid2.pdf deleted file mode 100644 index 98a1d2d08c8..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid2.py b/plot_directive/mpl_examples/axes_grid/demo_curvelinear_grid2.py deleted file mode 100644 index 2d96044a2a7..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/demo_floating_axes.hires.png b/plot_directive/mpl_examples/axes_grid/demo_floating_axes.hires.png deleted file mode 100644 index e4a2ac09178..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_floating_axes.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_floating_axes.pdf b/plot_directive/mpl_examples/axes_grid/demo_floating_axes.pdf deleted file mode 100644 index 3c43d449700..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_floating_axes.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_floating_axes.py b/plot_directive/mpl_examples/axes_grid/demo_floating_axes.py deleted file mode 100644 index 9eda9e4a2ab..00000000000 --- a/plot_directive/mpl_examples/axes_grid/demo_floating_axes.py +++ /dev/null @@ -1,154 +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) - - grid_helper.grid_finder.grid_locator1._nbins = 4 - grid_helper.grid_finder.grid_locator2._nbins = 4 - - return ax1 - - -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 = setup_axes1(fig, 131) - - #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. # indegree - radius = np.random.rand(10)*14000. - aux_ax3.scatter(theta, radius) - - plt.show() - diff --git a/plot_directive/mpl_examples/axes_grid/demo_floating_axis.hires.png b/plot_directive/mpl_examples/axes_grid/demo_floating_axis.hires.png deleted file mode 100644 index daa5d0388cf..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_floating_axis.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_floating_axis.pdf b/plot_directive/mpl_examples/axes_grid/demo_floating_axis.pdf deleted file mode 100644 index 84fcef6834d..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_floating_axis.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_floating_axis.py b/plot_directive/mpl_examples/axes_grid/demo_floating_axis.py deleted file mode 100644 index dc9ed3be94b..00000000000 --- a/plot_directive/mpl_examples/axes_grid/demo_floating_axis.py +++ /dev/null @@ -1,71 +0,0 @@ -""" -An experimental support for curvelinear 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/plot_directive/mpl_examples/axes_grid/demo_parasite_axes2.hires.png b/plot_directive/mpl_examples/axes_grid/demo_parasite_axes2.hires.png deleted file mode 100644 index bce4a734634..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_parasite_axes2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_parasite_axes2.pdf b/plot_directive/mpl_examples/axes_grid/demo_parasite_axes2.pdf deleted file mode 100644 index e1365b7f939..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/demo_parasite_axes2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/demo_parasite_axes2.py b/plot_directive/mpl_examples/axes_grid/demo_parasite_axes2.py deleted file mode 100644 index 2f73bb084cc..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/inset_locator_demo.hires.png b/plot_directive/mpl_examples/axes_grid/inset_locator_demo.hires.png deleted file mode 100644 index f76bbe56ebe..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/inset_locator_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/inset_locator_demo.pdf b/plot_directive/mpl_examples/axes_grid/inset_locator_demo.pdf deleted file mode 100644 index 7ed16cc8232..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/inset_locator_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/inset_locator_demo.py b/plot_directive/mpl_examples/axes_grid/inset_locator_demo.py deleted file mode 100644 index 9dfe0024feb..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/inset_locator_demo2.hires.png b/plot_directive/mpl_examples/axes_grid/inset_locator_demo2.hires.png deleted file mode 100644 index 16f8e628bd8..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/inset_locator_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/inset_locator_demo2.pdf b/plot_directive/mpl_examples/axes_grid/inset_locator_demo2.pdf deleted file mode 100644 index 23601cc81f6..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/inset_locator_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/inset_locator_demo2.py b/plot_directive/mpl_examples/axes_grid/inset_locator_demo2.py deleted file mode 100644 index a4e08be3493..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/parasite_simple2.hires.png b/plot_directive/mpl_examples/axes_grid/parasite_simple2.hires.png deleted file mode 100644 index babc0e585bd..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/parasite_simple2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/parasite_simple2.pdf b/plot_directive/mpl_examples/axes_grid/parasite_simple2.pdf deleted file mode 100644 index 9ff7bee6050..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/parasite_simple2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/parasite_simple2.py b/plot_directive/mpl_examples/axes_grid/parasite_simple2.py deleted file mode 100644 index 136ffd2912b..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/scatter_hist.hires.png b/plot_directive/mpl_examples/axes_grid/scatter_hist.hires.png deleted file mode 100644 index 4c362226c8e..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/scatter_hist.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/scatter_hist.pdf b/plot_directive/mpl_examples/axes_grid/scatter_hist.pdf deleted file mode 100644 index dd313b76ec5..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/scatter_hist.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/scatter_hist.py b/plot_directive/mpl_examples/axes_grid/scatter_hist.py deleted file mode 100644 index b846704e0e7..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/simple_anchored_artists.hires.png b/plot_directive/mpl_examples/axes_grid/simple_anchored_artists.hires.png deleted file mode 100644 index 6c8104f3a39..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/simple_anchored_artists.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/simple_anchored_artists.pdf b/plot_directive/mpl_examples/axes_grid/simple_anchored_artists.pdf deleted file mode 100644 index 1cf479f708e..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/simple_anchored_artists.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/simple_anchored_artists.py b/plot_directive/mpl_examples/axes_grid/simple_anchored_artists.py deleted file mode 100644 index 8853534d23b..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/simple_axesgrid.hires.png b/plot_directive/mpl_examples/axes_grid/simple_axesgrid.hires.png deleted file mode 100644 index 486f34bfb19..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/simple_axesgrid.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/simple_axesgrid.pdf b/plot_directive/mpl_examples/axes_grid/simple_axesgrid.pdf deleted file mode 100644 index 8160b17854d..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/simple_axesgrid.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/simple_axesgrid.py b/plot_directive/mpl_examples/axes_grid/simple_axesgrid.py deleted file mode 100644 index 5038b4eee0b..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/simple_axesgrid2.hires.png b/plot_directive/mpl_examples/axes_grid/simple_axesgrid2.hires.png deleted file mode 100644 index 25796b99581..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/simple_axesgrid2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/simple_axesgrid2.pdf b/plot_directive/mpl_examples/axes_grid/simple_axesgrid2.pdf deleted file mode 100644 index 0065c4c7cff..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/simple_axesgrid2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/simple_axesgrid2.py b/plot_directive/mpl_examples/axes_grid/simple_axesgrid2.py deleted file mode 100644 index efd7fb45a9b..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/simple_axisline4.hires.png b/plot_directive/mpl_examples/axes_grid/simple_axisline4.hires.png deleted file mode 100644 index 79e08aa4db1..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/simple_axisline4.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/simple_axisline4.pdf b/plot_directive/mpl_examples/axes_grid/simple_axisline4.pdf deleted file mode 100644 index 6662c5f654b..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/simple_axisline4.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/simple_axisline4.py b/plot_directive/mpl_examples/axes_grid/simple_axisline4.py deleted file mode 100644 index 3b2c675666b..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_divider.png b/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_divider.png deleted file mode 100644 index 4a773b81a86..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_divider.png and /dev/null differ diff --git a/plot_directive/mpl_examples/axes_grid/thumbnails/demo_parasite_axes2.png b/plot_directive/mpl_examples/axes_grid/thumbnails/demo_parasite_axes2.png deleted file mode 100644 index c1fb71bca35..00000000000 Binary files a/plot_directive/mpl_examples/axes_grid/thumbnails/demo_parasite_axes2.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/2dcollections3d_demo.hires.png b/plot_directive/mpl_examples/mplot3d/2dcollections3d_demo.hires.png deleted file mode 100644 index 57794590eb2..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/2dcollections3d_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/2dcollections3d_demo.pdf b/plot_directive/mpl_examples/mplot3d/2dcollections3d_demo.pdf deleted file mode 100644 index fc78d445727..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/2dcollections3d_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/2dcollections3d_demo.py b/plot_directive/mpl_examples/mplot3d/2dcollections3d_demo.py deleted file mode 100644 index 2f53f542c6f..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/mplot3d/bars3d_demo.hires.png b/plot_directive/mpl_examples/mplot3d/bars3d_demo.hires.png deleted file mode 100644 index ebad92270d6..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/bars3d_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/bars3d_demo.pdf b/plot_directive/mpl_examples/mplot3d/bars3d_demo.pdf deleted file mode 100644 index 5d73be8f30c..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/bars3d_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/bars3d_demo.py b/plot_directive/mpl_examples/mplot3d/bars3d_demo.py deleted file mode 100644 index 8dc76c24cf4..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/mplot3d/contour3d_demo.hires.png b/plot_directive/mpl_examples/mplot3d/contour3d_demo.hires.png deleted file mode 100644 index 62e84609dd4..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/contour3d_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/contour3d_demo.pdf b/plot_directive/mpl_examples/mplot3d/contour3d_demo.pdf deleted file mode 100644 index be404836f82..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/contour3d_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/contour3d_demo.py b/plot_directive/mpl_examples/mplot3d/contour3d_demo.py deleted file mode 100644 index 87eb9551fe1..00000000000 --- a/plot_directive/mpl_examples/mplot3d/contour3d_demo.py +++ /dev/null @@ -1,11 +0,0 @@ -from mpl_toolkits.mplot3d import axes3d -import matplotlib.pyplot as plt - -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) -ax.clabel(cset, fontsize=9, inline=1) - -plt.show() - diff --git a/plot_directive/mpl_examples/mplot3d/contour3d_demo2.hires.png b/plot_directive/mpl_examples/mplot3d/contour3d_demo2.hires.png deleted file mode 100644 index 72c71d2a931..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/contour3d_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/contour3d_demo2.pdf b/plot_directive/mpl_examples/mplot3d/contour3d_demo2.pdf deleted file mode 100644 index 8739a342fca..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/contour3d_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/contour3d_demo2.py b/plot_directive/mpl_examples/mplot3d/contour3d_demo2.py deleted file mode 100644 index 94bc66531c8..00000000000 --- a/plot_directive/mpl_examples/mplot3d/contour3d_demo2.py +++ /dev/null @@ -1,11 +0,0 @@ -from mpl_toolkits.mplot3d import axes3d -import matplotlib.pyplot as plt - -fig = plt.figure() -ax = fig.gca(projection='3d') -X, Y, Z = axes3d.get_test_data(0.05) -cset = ax.contour(X, Y, Z, 16, extend3d=True) -ax.clabel(cset, fontsize=9, inline=1) - -plt.show() - diff --git a/plot_directive/mpl_examples/mplot3d/contour3d_demo3.hires.png b/plot_directive/mpl_examples/mplot3d/contour3d_demo3.hires.png deleted file mode 100644 index ddadb183055..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/contour3d_demo3.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/contour3d_demo3.pdf b/plot_directive/mpl_examples/mplot3d/contour3d_demo3.pdf deleted file mode 100644 index 1c8b73b467f..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/contour3d_demo3.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/contour3d_demo3.py b/plot_directive/mpl_examples/mplot3d/contour3d_demo3.py deleted file mode 100644 index b5d75e65b84..00000000000 --- a/plot_directive/mpl_examples/mplot3d/contour3d_demo3.py +++ /dev/null @@ -1,20 +0,0 @@ -from mpl_toolkits.mplot3d import axes3d -import matplotlib.pyplot as plt - -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) -cset = ax.contour(X, Y, Z, zdir='x', offset=-40) -cset = ax.contour(X, Y, Z, zdir='y', offset=40) - -ax.set_xlabel('X') -ax.set_xlim3d(-40, 40) -ax.set_ylabel('Y') -ax.set_ylim3d(-40, 40) -ax.set_zlabel('Z') -ax.set_zlim3d(-100, 100) - -plt.show() - diff --git a/plot_directive/mpl_examples/mplot3d/contourf3d_demo.hires.png b/plot_directive/mpl_examples/mplot3d/contourf3d_demo.hires.png deleted file mode 100644 index e42f1bebccf..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/contourf3d_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/contourf3d_demo.pdf b/plot_directive/mpl_examples/mplot3d/contourf3d_demo.pdf deleted file mode 100644 index 52826da0a57..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/contourf3d_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/contourf3d_demo.py b/plot_directive/mpl_examples/mplot3d/contourf3d_demo.py deleted file mode 100644 index 171453134f7..00000000000 --- a/plot_directive/mpl_examples/mplot3d/contourf3d_demo.py +++ /dev/null @@ -1,11 +0,0 @@ -from mpl_toolkits.mplot3d import axes3d -import matplotlib.pyplot as plt - -fig = plt.figure() -ax = fig.gca(projection='3d') -X, Y, Z = axes3d.get_test_data(0.05) -cset = ax.contourf(X, Y, Z) -ax.clabel(cset, fontsize=9, inline=1) - -plt.show() - diff --git a/plot_directive/mpl_examples/mplot3d/hist3d_demo.hires.png b/plot_directive/mpl_examples/mplot3d/hist3d_demo.hires.png deleted file mode 100644 index 90ae1e48901..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/hist3d_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/hist3d_demo.pdf b/plot_directive/mpl_examples/mplot3d/hist3d_demo.pdf deleted file mode 100644 index c5349b6e76f..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/hist3d_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/hist3d_demo.py b/plot_directive/mpl_examples/mplot3d/hist3d_demo.py deleted file mode 100644 index 0af55a4288d..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/mplot3d/lines3d_demo.hires.png b/plot_directive/mpl_examples/mplot3d/lines3d_demo.hires.png deleted file mode 100644 index 0f78aaabf5b..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/lines3d_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/lines3d_demo.pdf b/plot_directive/mpl_examples/mplot3d/lines3d_demo.pdf deleted file mode 100644 index 7a8f8ac571c..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/lines3d_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/lines3d_demo.py b/plot_directive/mpl_examples/mplot3d/lines3d_demo.py deleted file mode 100644 index 883657d9ef4..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/mplot3d/mixed_subplots_demo.hires.png b/plot_directive/mpl_examples/mplot3d/mixed_subplots_demo.hires.png deleted file mode 100644 index 1414e4ae728..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/mixed_subplots_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/mixed_subplots_demo.pdf b/plot_directive/mpl_examples/mplot3d/mixed_subplots_demo.pdf deleted file mode 100644 index 44cf859b6ee..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/mixed_subplots_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/mixed_subplots_demo.py b/plot_directive/mpl_examples/mplot3d/mixed_subplots_demo.py deleted file mode 100644 index 6517fe1bda7..00000000000 --- a/plot_directive/mpl_examples/mplot3d/mixed_subplots_demo.py +++ /dev/null @@ -1,48 +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) - -fig = plt.figure() -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/plot_directive/mpl_examples/mplot3d/pathpatch3d_demo.hires.png b/plot_directive/mpl_examples/mplot3d/pathpatch3d_demo.hires.png deleted file mode 100644 index 7b9c0092896..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/pathpatch3d_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/pathpatch3d_demo.pdf b/plot_directive/mpl_examples/mplot3d/pathpatch3d_demo.pdf deleted file mode 100644 index de414151790..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/pathpatch3d_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/pathpatch3d_demo.py b/plot_directive/mpl_examples/mplot3d/pathpatch3d_demo.py deleted file mode 100644 index 3aee915e023..00000000000 --- a/plot_directive/mpl_examples/mplot3d/pathpatch3d_demo.py +++ /dev/null @@ -1,52 +0,0 @@ -import matplotlib.pyplot as plt -from matplotlib.patches import Circle, PathPatch -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, (x, y, z), s, zdir="z", size=None, angle=0, usetex=False, - **kwargs): - - 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} = \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/plot_directive/mpl_examples/mplot3d/polys3d_demo.hires.png b/plot_directive/mpl_examples/mplot3d/polys3d_demo.hires.png deleted file mode 100644 index 84fcaaedafd..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/polys3d_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/polys3d_demo.pdf b/plot_directive/mpl_examples/mplot3d/polys3d_demo.pdf deleted file mode 100644 index 527e507da8f..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/polys3d_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/polys3d_demo.py b/plot_directive/mpl_examples/mplot3d/polys3d_demo.py deleted file mode 100644 index cd2aaa05177..00000000000 --- a/plot_directive/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(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/plot_directive/mpl_examples/mplot3d/rotate_axes3d_demo.hires.png b/plot_directive/mpl_examples/mplot3d/rotate_axes3d_demo.hires.png deleted file mode 100644 index 1836bbce848..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/rotate_axes3d_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/rotate_axes3d_demo.pdf b/plot_directive/mpl_examples/mplot3d/rotate_axes3d_demo.pdf deleted file mode 100644 index 3119c7bfbfa..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/rotate_axes3d_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/rotate_axes3d_demo.py b/plot_directive/mpl_examples/mplot3d/rotate_axes3d_demo.py deleted file mode 100644 index ad8a1f70b6e..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/mplot3d/scatter3d_demo.hires.png b/plot_directive/mpl_examples/mplot3d/scatter3d_demo.hires.png deleted file mode 100644 index 7b12d7264f5..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/scatter3d_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/scatter3d_demo.pdf b/plot_directive/mpl_examples/mplot3d/scatter3d_demo.pdf deleted file mode 100644 index c6d593191c2..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/scatter3d_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/scatter3d_demo.py b/plot_directive/mpl_examples/mplot3d/scatter3d_demo.py deleted file mode 100644 index 1a1a7dd18b7..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/mplot3d/subplot3d_demo.hires.png b/plot_directive/mpl_examples/mplot3d/subplot3d_demo.hires.png deleted file mode 100644 index 03a3cce90cd..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/subplot3d_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/subplot3d_demo.pdf b/plot_directive/mpl_examples/mplot3d/subplot3d_demo.pdf deleted file mode 100644 index c784d31eaa8..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/subplot3d_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/subplot3d_demo.py b/plot_directive/mpl_examples/mplot3d/subplot3d_demo.py deleted file mode 100644 index 2dd94bd268c..00000000000 --- a/plot_directive/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 - - -fig = plt.figure(figsize=(9.5,5.0)) - -#---- 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.jet, - 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/plot_directive/mpl_examples/mplot3d/surface3d_demo.hires.png b/plot_directive/mpl_examples/mplot3d/surface3d_demo.hires.png deleted file mode 100644 index 6258e1af7b1..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/surface3d_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/surface3d_demo.pdf b/plot_directive/mpl_examples/mplot3d/surface3d_demo.pdf deleted file mode 100644 index 5e5ca09e3ed..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/surface3d_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/surface3d_demo.py b/plot_directive/mpl_examples/mplot3d/surface3d_demo.py deleted file mode 100644 index 301ee1162a5..00000000000 --- a/plot_directive/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, FixedLocator, 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.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) - -plt.show() - diff --git a/plot_directive/mpl_examples/mplot3d/surface3d_demo2.hires.png b/plot_directive/mpl_examples/mplot3d/surface3d_demo2.hires.png deleted file mode 100644 index a34d80611f5..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/surface3d_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/surface3d_demo2.pdf b/plot_directive/mpl_examples/mplot3d/surface3d_demo2.pdf deleted file mode 100644 index 4556be0c879..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/surface3d_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/surface3d_demo2.py b/plot_directive/mpl_examples/mplot3d/surface3d_demo2.py deleted file mode 100644 index 80684036b55..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/mplot3d/surface3d_demo3.hires.png b/plot_directive/mpl_examples/mplot3d/surface3d_demo3.hires.png deleted file mode 100644 index 0a83730e779..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/surface3d_demo3.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/surface3d_demo3.pdf b/plot_directive/mpl_examples/mplot3d/surface3d_demo3.pdf deleted file mode 100644 index a5e131bfb7d..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/surface3d_demo3.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/surface3d_demo3.py b/plot_directive/mpl_examples/mplot3d/surface3d_demo3.py deleted file mode 100644 index e1c790da50f..00000000000 --- a/plot_directive/mpl_examples/mplot3d/surface3d_demo3.py +++ /dev/null @@ -1,31 +0,0 @@ -from mpl_toolkits.mplot3d 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.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)) -ax.w_zaxis.set_major_formatter(FormatStrFormatter('%.03f')) - -plt.show() - diff --git a/plot_directive/mpl_examples/mplot3d/surface3d_radial_demo.hires.png b/plot_directive/mpl_examples/mplot3d/surface3d_radial_demo.hires.png deleted file mode 100644 index f607b6e430e..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/surface3d_radial_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/surface3d_radial_demo.pdf b/plot_directive/mpl_examples/mplot3d/surface3d_radial_demo.pdf deleted file mode 100644 index 51990f09d85..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/surface3d_radial_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/surface3d_radial_demo.py b/plot_directive/mpl_examples/mplot3d/surface3d_radial_demo.py deleted file mode 100644 index 8e8a3c84bd3..00000000000 --- a/plot_directive/mpl_examples/mplot3d/surface3d_radial_demo.py +++ /dev/null @@ -1,27 +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.jet) -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)$') -ax.set_xticks([]) -plt.show() diff --git a/plot_directive/mpl_examples/mplot3d/text3d_demo.hires.png b/plot_directive/mpl_examples/mplot3d/text3d_demo.hires.png deleted file mode 100644 index 34cf006adef..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/text3d_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/text3d_demo.pdf b/plot_directive/mpl_examples/mplot3d/text3d_demo.pdf deleted file mode 100644 index b930353ea30..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/text3d_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/text3d_demo.py b/plot_directive/mpl_examples/mplot3d/text3d_demo.py deleted file mode 100644 index da7e1a88d45..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/mplot3d/wire3d_animation_demo.hires.png b/plot_directive/mpl_examples/mplot3d/wire3d_animation_demo.hires.png deleted file mode 100644 index b0c415641ca..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/wire3d_animation_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/wire3d_animation_demo.pdf b/plot_directive/mpl_examples/mplot3d/wire3d_animation_demo.pdf deleted file mode 100644 index 771e25f831d..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/wire3d_animation_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/wire3d_animation_demo.py b/plot_directive/mpl_examples/mplot3d/wire3d_animation_demo.py deleted file mode 100644 index dc654f3ab84..00000000000 --- a/plot_directive/mpl_examples/mplot3d/wire3d_animation_demo.py +++ /dev/null @@ -1,37 +0,0 @@ -""" -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/plot_directive/mpl_examples/mplot3d/wire3d_demo.hires.png b/plot_directive/mpl_examples/mplot3d/wire3d_demo.hires.png deleted file mode 100644 index 8ff7d6bbc7a..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/wire3d_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/wire3d_demo.pdf b/plot_directive/mpl_examples/mplot3d/wire3d_demo.pdf deleted file mode 100644 index 824ba701b6b..00000000000 Binary files a/plot_directive/mpl_examples/mplot3d/wire3d_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/mplot3d/wire3d_demo.py b/plot_directive/mpl_examples/mplot3d/wire3d_demo.py deleted file mode 100644 index 8bb749738c8..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pie_and_polar_charts/thumbnails/pie_demo_features.png b/plot_directive/mpl_examples/pie_and_polar_charts/thumbnails/pie_demo_features.png deleted file mode 100644 index 924f0d40bb3..00000000000 Binary files a/plot_directive/mpl_examples/pie_and_polar_charts/thumbnails/pie_demo_features.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/accented_text.hires.png b/plot_directive/mpl_examples/pylab_examples/accented_text.hires.png deleted file mode 100644 index ddce395e569..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/accented_text.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/accented_text.pdf b/plot_directive/mpl_examples/pylab_examples/accented_text.pdf deleted file mode 100644 index ec24afc89f9..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/accented_text.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/accented_text.py b/plot_directive/mpl_examples/pylab_examples/accented_text.py deleted file mode 100644 index 1482622f389..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/agg_buffer_to_array.py b/plot_directive/mpl_examples/pylab_examples/agg_buffer_to_array.py deleted file mode 100644 index d18fc904f2a..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/agg_buffer_to_array.py +++ /dev/null @@ -1,23 +0,0 @@ -import matplotlib -matplotlib.use('Agg') -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 rhe pixel buffer and dumpy it into a numpy array -buf = fig.canvas.buffer_rgba(0,0) -l, b, w, h = fig.bbox.bounds -X = np.fromstring(buf, np.uint8) -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/plot_directive/mpl_examples/pylab_examples/agg_buffer_to_array_00.hires.png b/plot_directive/mpl_examples/pylab_examples/agg_buffer_to_array_00.hires.png deleted file mode 100644 index ecc3fc64bcb..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/agg_buffer_to_array_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/agg_buffer_to_array_00.pdf b/plot_directive/mpl_examples/pylab_examples/agg_buffer_to_array_00.pdf deleted file mode 100644 index b9adbdef08b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/agg_buffer_to_array_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/agg_buffer_to_array_01.hires.png b/plot_directive/mpl_examples/pylab_examples/agg_buffer_to_array_01.hires.png deleted file mode 100644 index 76788baabe6..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/agg_buffer_to_array_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/agg_buffer_to_array_01.pdf b/plot_directive/mpl_examples/pylab_examples/agg_buffer_to_array_01.pdf deleted file mode 100644 index 8355bdcbd2f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/agg_buffer_to_array_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/alignment_test.hires.png b/plot_directive/mpl_examples/pylab_examples/alignment_test.hires.png deleted file mode 100644 index 03bff23256c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/alignment_test.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/alignment_test.pdf b/plot_directive/mpl_examples/pylab_examples/alignment_test.pdf deleted file mode 100644 index df3c207c062..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/alignment_test.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/alignment_test.py b/plot_directive/mpl_examples/pylab_examples/alignment_test.py deleted file mode 100644 index 1dd83d5d4f5..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/anchored_artists.py b/plot_directive/mpl_examples/pylab_examples/anchored_artists.py deleted file mode 100644 index 938d47a9629..00000000000 --- a/plot_directive/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-alinged). - - 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/plot_directive/mpl_examples/pylab_examples/annotation_demo.py b/plot_directive/mpl_examples/pylab_examples/annotation_demo.py deleted file mode 100644 index 267b0b288f8..00000000000 --- a/plot_directive/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 catesian 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/plot_directive/mpl_examples/pylab_examples/annotation_demo2.py b/plot_directive/mpl_examples/pylab_examples/annotation_demo2.py deleted file mode 100644 index b3fd99ed6b8..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/annotation_demo2_00.hires.png b/plot_directive/mpl_examples/pylab_examples/annotation_demo2_00.hires.png deleted file mode 100644 index 6846488aa1b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/annotation_demo2_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/annotation_demo2_00.pdf b/plot_directive/mpl_examples/pylab_examples/annotation_demo2_00.pdf deleted file mode 100644 index 1310b05edeb..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/annotation_demo2_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/annotation_demo2_01.hires.png b/plot_directive/mpl_examples/pylab_examples/annotation_demo2_01.hires.png deleted file mode 100644 index 694fc323e2c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/annotation_demo2_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/annotation_demo2_01.pdf b/plot_directive/mpl_examples/pylab_examples/annotation_demo2_01.pdf deleted file mode 100644 index 1929682c624..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/annotation_demo2_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/annotation_demo3.hires.png b/plot_directive/mpl_examples/pylab_examples/annotation_demo3.hires.png deleted file mode 100644 index a0b5791a22c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/annotation_demo3.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/annotation_demo3.pdf b/plot_directive/mpl_examples/pylab_examples/annotation_demo3.pdf deleted file mode 100644 index 41b1fa21207..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/annotation_demo3.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/annotation_demo3.py b/plot_directive/mpl_examples/pylab_examples/annotation_demo3.py deleted file mode 100644 index cf78da77cdb..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/annotation_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/annotation_demo_00.hires.png deleted file mode 100644 index d81725b5076..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/annotation_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/annotation_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/annotation_demo_00.pdf deleted file mode 100644 index 3e7b7217c0e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/annotation_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/annotation_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/annotation_demo_01.hires.png deleted file mode 100644 index 00e1ded8127..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/annotation_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/annotation_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/annotation_demo_01.pdf deleted file mode 100644 index adfbdeb2fd3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/annotation_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/annotation_demo_02.hires.png b/plot_directive/mpl_examples/pylab_examples/annotation_demo_02.hires.png deleted file mode 100644 index 49d75b3ff2c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/annotation_demo_02.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/annotation_demo_02.pdf b/plot_directive/mpl_examples/pylab_examples/annotation_demo_02.pdf deleted file mode 100644 index 073317dc522..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/annotation_demo_02.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/anscombe.hires.png b/plot_directive/mpl_examples/pylab_examples/anscombe.hires.png deleted file mode 100644 index 9161138eea0..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/anscombe.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/anscombe.pdf b/plot_directive/mpl_examples/pylab_examples/anscombe.pdf deleted file mode 100644 index b657a894dac..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/anscombe.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/anscombe.py b/plot_directive/mpl_examples/pylab_examples/anscombe.py deleted file mode 100644 index ab045b98a65..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/anscombe.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python -""" -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, 'IIII', 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/plot_directive/mpl_examples/pylab_examples/arctest.hires.png b/plot_directive/mpl_examples/pylab_examples/arctest.hires.png deleted file mode 100644 index daff28b7fde..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/arctest.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/arctest.pdf b/plot_directive/mpl_examples/pylab_examples/arctest.pdf deleted file mode 100644 index 77688f3f372..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/arctest.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/arctest.py b/plot_directive/mpl_examples/pylab_examples/arctest.py deleted file mode 100644 index 90e3bd9236c..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/arrow_demo.py b/plot_directive/mpl_examples/pylab_examples/arrow_demo.py deleted file mode 100644 index 232193e2a5b..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/aspect_loglog.hires.png b/plot_directive/mpl_examples/pylab_examples/aspect_loglog.hires.png deleted file mode 100644 index 5d68a063692..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/aspect_loglog.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/aspect_loglog.pdf b/plot_directive/mpl_examples/pylab_examples/aspect_loglog.pdf deleted file mode 100644 index fccb19949fa..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/aspect_loglog.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/aspect_loglog.py b/plot_directive/mpl_examples/pylab_examples/aspect_loglog.py deleted file mode 100644 index 4ce384633e9..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/axes_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/axes_demo.hires.png deleted file mode 100644 index 502ca1998ff..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/axes_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/axes_demo.pdf b/plot_directive/mpl_examples/pylab_examples/axes_demo.pdf deleted file mode 100644 index aef0ccdc8f5..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/axes_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/axes_demo.py b/plot_directive/mpl_examples/pylab_examples/axes_demo.py deleted file mode 100644 index 34ace972d0b..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/axes_props.hires.png b/plot_directive/mpl_examples/pylab_examples/axes_props.hires.png deleted file mode 100644 index c389ebaec8e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/axes_props.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/axes_props.pdf b/plot_directive/mpl_examples/pylab_examples/axes_props.pdf deleted file mode 100644 index 04208f70f7a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/axes_props.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/axes_props.py b/plot_directive/mpl_examples/pylab_examples/axes_props.py deleted file mode 100644 index 7fe564ef7d4..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/axes_zoom_effect.py b/plot_directive/mpl_examples/pylab_examples/axes_zoom_effect.py deleted file mode 100644 index b01e2d91472..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/axes_zoom_effect.py +++ /dev/null @@ -1,120 +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): - u""" - 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): - u""" - 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 - - -if __name__ == "__main__": - 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/plot_directive/mpl_examples/pylab_examples/axhspan_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/axhspan_demo.hires.png deleted file mode 100644 index 9d8fd6f8e4e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/axhspan_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/axhspan_demo.pdf b/plot_directive/mpl_examples/pylab_examples/axhspan_demo.pdf deleted file mode 100644 index 6a5a2e3fb15..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/axhspan_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/axhspan_demo.py b/plot_directive/mpl_examples/pylab_examples/axhspan_demo.py deleted file mode 100644 index 338c5d69056..00000000000 --- a/plot_directive/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 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/plot_directive/mpl_examples/pylab_examples/axis_equal_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/axis_equal_demo.hires.png deleted file mode 100644 index 1e252825634..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/axis_equal_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/axis_equal_demo.pdf b/plot_directive/mpl_examples/pylab_examples/axis_equal_demo.pdf deleted file mode 100644 index 486a6db3cdf..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/axis_equal_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/axis_equal_demo.py b/plot_directive/mpl_examples/pylab_examples/axis_equal_demo.py deleted file mode 100644 index e850a847427..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/bar_stacked.hires.png b/plot_directive/mpl_examples/pylab_examples/bar_stacked.hires.png deleted file mode 100644 index 918a98574e6..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/bar_stacked.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/bar_stacked.pdf b/plot_directive/mpl_examples/pylab_examples/bar_stacked.pdf deleted file mode 100644 index 6c2bd34594a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/bar_stacked.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/bar_stacked.py b/plot_directive/mpl_examples/pylab_examples/bar_stacked.py deleted file mode 100644 index f1cf8c0c38b..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/barb_demo.py b/plot_directive/mpl_examples/pylab_examples/barb_demo.py deleted file mode 100644 index 71e948fbdf9..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/barb_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/barb_demo_00.hires.png deleted file mode 100644 index 30112f49a52..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/barb_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/barb_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/barb_demo_00.pdf deleted file mode 100644 index 275b061c8a4..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/barb_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/barb_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/barb_demo_01.hires.png deleted file mode 100644 index 3e506590d18..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/barb_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/barb_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/barb_demo_01.pdf deleted file mode 100644 index 9db942a1095..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/barb_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/barchart_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/barchart_demo.hires.png deleted file mode 100644 index 5f316d6340e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/barchart_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/barchart_demo.pdf b/plot_directive/mpl_examples/pylab_examples/barchart_demo.pdf deleted file mode 100644 index 1ec8ea81281..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/barchart_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/barchart_demo.py b/plot_directive/mpl_examples/pylab_examples/barchart_demo.py deleted file mode 100644 index e5f86cf4d2c..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/barchart_demo.py +++ /dev/null @@ -1,44 +0,0 @@ - -#!/usr/bin/env python -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 - - -plt.subplot(111) -rects1 = plt.bar(ind, menMeans, width, - color='r', - yerr=menStd, - error_kw=dict(elinewidth=6, ecolor='pink')) - -womenMeans = (25, 32, 34, 20, 25) -womenStd = (3, 5, 2, 3, 3) -rects2 = plt.bar(ind+width, womenMeans, width, - color='y', - yerr=womenStd, - error_kw=dict(elinewidth=6, ecolor='yellow')) - -# add some -plt.ylabel('Scores') -plt.title('Scores by group and gender') -plt.xticks(ind+width, ('G1', 'G2', 'G3', 'G4', 'G5') ) - -plt.legend( (rects1[0], rects2[0]), ('Men', 'Women') ) - -def autolabel(rects): - # attach some text labels - for rect in rects: - height = rect.get_height() - plt.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/plot_directive/mpl_examples/pylab_examples/barchart_demo2.hires.png b/plot_directive/mpl_examples/pylab_examples/barchart_demo2.hires.png deleted file mode 100644 index a4573f25eb8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/barchart_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/barchart_demo2.pdf b/plot_directive/mpl_examples/pylab_examples/barchart_demo2.pdf deleted file mode 100644 index 3ca7a544043..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/barchart_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/barchart_demo2.py b/plot_directive/mpl_examples/pylab_examples/barchart_demo2.py deleted file mode 100644 index 53ffdc41968..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/barcode_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/barcode_demo.hires.png deleted file mode 100644 index 21637f65db9..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/barcode_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/barcode_demo.pdf b/plot_directive/mpl_examples/pylab_examples/barcode_demo.pdf deleted file mode 100644 index 4f1e6f64a00..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/barcode_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/barcode_demo.py b/plot_directive/mpl_examples/pylab_examples/barcode_demo.py deleted file mode 100644 index 2e4eba0c1b1..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/barh_demo.py b/plot_directive/mpl_examples/pylab_examples/barh_demo.py deleted file mode 100644 index 0daef263fd3..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/barh_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/barh_demo_00.hires.png deleted file mode 100644 index 0305d4241c8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/barh_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/barh_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/barh_demo_00.pdf deleted file mode 100644 index b330ecfbff3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/barh_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/barh_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/barh_demo_01.hires.png deleted file mode 100644 index 46a1f61adab..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/barh_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/barh_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/barh_demo_01.pdf deleted file mode 100644 index 0134acb332b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/barh_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo.py b/plot_directive/mpl_examples/pylab_examples/boxplot_demo.py deleted file mode 100644 index d220adc3541..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/boxplot_demo2.hires.png b/plot_directive/mpl_examples/pylab_examples/boxplot_demo2.hires.png deleted file mode 100644 index 623c34073f6..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo2.pdf b/plot_directive/mpl_examples/pylab_examples/boxplot_demo2.pdf deleted file mode 100644 index 6fa1e53bf9f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo2.py b/plot_directive/mpl_examples/pylab_examples/boxplot_demo2.py deleted file mode 100644 index 1e7e1171b72..00000000000 --- a/plot_directive/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 horixzontal 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/plot_directive/mpl_examples/pylab_examples/boxplot_demo3.hires.png b/plot_directive/mpl_examples/pylab_examples/boxplot_demo3.hires.png deleted file mode 100644 index fd07a58660c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo3.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo3.pdf b/plot_directive/mpl_examples/pylab_examples/boxplot_demo3.pdf deleted file mode 100644 index b91f2f6ac6b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo3.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo3.py b/plot_directive/mpl_examples/pylab_examples/boxplot_demo3.py deleted file mode 100644 index 9cf9e795b20..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/boxplot_demo3.py +++ /dev/null @@ -1,27 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.transforms as mtransforms -import numpy as np - -np.random.seed(2) -inc = 0.1 -e1 = np.random.uniform(0,1, size=(500,)) -e2 = np.random.uniform(0,1, size=(500,)) -e3 = np.random.uniform(0,1 + inc, size=(500,)) -e4 = np.random.uniform(0,1 + 2*inc, size=(500,)) - -treatments = [e1,e2,e3,e4] - -fig = plt.figure() -ax = fig.add_subplot(111) -pos = np.array(range(len(treatments)))+1 -bp = ax.boxplot( treatments, sym='k+', patch_artist=True, - positions=pos, notch=1, bootstrap=5000 ) -text_transform= mtransforms.blended_transform_factory(ax.transData, - ax.transAxes) -ax.set_xlabel('treatment') -ax.set_ylabel('response') -ax.set_ylim(-0.2, 1.4) -plt.setp(bp['whiskers'], color='k', linestyle='-' ) -plt.setp(bp['fliers'], markersize=3.0) -fig.subplots_adjust(right=0.99,top=0.99) -plt.show() diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/boxplot_demo_00.hires.png deleted file mode 100644 index 4b0f6ec2938..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/boxplot_demo_00.pdf deleted file mode 100644 index b6839c24a33..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/boxplot_demo_01.hires.png deleted file mode 100644 index 2503561dde2..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/boxplot_demo_01.pdf deleted file mode 100644 index 1d97aff7ea1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_02.hires.png b/plot_directive/mpl_examples/pylab_examples/boxplot_demo_02.hires.png deleted file mode 100644 index 8c50dd798d3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_02.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_02.pdf b/plot_directive/mpl_examples/pylab_examples/boxplot_demo_02.pdf deleted file mode 100644 index 6e60b5a9913..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_02.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_03.hires.png b/plot_directive/mpl_examples/pylab_examples/boxplot_demo_03.hires.png deleted file mode 100644 index 707b4ebefce..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_03.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_03.pdf b/plot_directive/mpl_examples/pylab_examples/boxplot_demo_03.pdf deleted file mode 100644 index 3bc72c8b3a4..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_03.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_04.hires.png b/plot_directive/mpl_examples/pylab_examples/boxplot_demo_04.hires.png deleted file mode 100644 index 1dd9f9bf316..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_04.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_04.pdf b/plot_directive/mpl_examples/pylab_examples/boxplot_demo_04.pdf deleted file mode 100644 index 07202c6ff94..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_04.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_05.hires.png b/plot_directive/mpl_examples/pylab_examples/boxplot_demo_05.hires.png deleted file mode 100644 index 2a8ed9548df..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_05.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_05.pdf b/plot_directive/mpl_examples/pylab_examples/boxplot_demo_05.pdf deleted file mode 100644 index a034605434d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_05.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_06.hires.png b/plot_directive/mpl_examples/pylab_examples/boxplot_demo_06.hires.png deleted file mode 100644 index 33a8a6a2c3c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_06.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_06.pdf b/plot_directive/mpl_examples/pylab_examples/boxplot_demo_06.pdf deleted file mode 100644 index 7b65fec590c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/boxplot_demo_06.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/break.hires.png b/plot_directive/mpl_examples/pylab_examples/break.hires.png deleted file mode 100644 index 00211c5af99..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/break.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/break.pdf b/plot_directive/mpl_examples/pylab_examples/break.pdf deleted file mode 100644 index 40932843440..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/break.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/break.py b/plot_directive/mpl_examples/pylab_examples/break.py deleted file mode 100644 index 6b1f6142d1d..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/broken_barh.hires.png b/plot_directive/mpl_examples/pylab_examples/broken_barh.hires.png deleted file mode 100644 index 7913482feeb..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/broken_barh.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/broken_barh.pdf b/plot_directive/mpl_examples/pylab_examples/broken_barh.pdf deleted file mode 100644 index b4a5bdefe48..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/broken_barh.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/broken_barh.py b/plot_directive/mpl_examples/pylab_examples/broken_barh.py deleted file mode 100644 index 3d427e61f61..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/centered_ticklabels.hires.png b/plot_directive/mpl_examples/pylab_examples/centered_ticklabels.hires.png deleted file mode 100644 index 8c0500e474f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/centered_ticklabels.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/centered_ticklabels.pdf b/plot_directive/mpl_examples/pylab_examples/centered_ticklabels.pdf deleted file mode 100644 index 8c868733bbd..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/centered_ticklabels.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/centered_ticklabels.py b/plot_directive/mpl_examples/pylab_examples/centered_ticklabels.py deleted file mode 100644 index 278ab18f0c8..00000000000 --- a/plot_directive/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', 'feft', or 'right' using the horizontal alignment property: -# -# -# for label in ax.xaxis.get_xticklabels(): -# label.set_horizntal_alignment('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') -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/plot_directive/mpl_examples/pylab_examples/clippedline.hires.png b/plot_directive/mpl_examples/pylab_examples/clippedline.hires.png deleted file mode 100644 index e20af694713..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/clippedline.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/clippedline.pdf b/plot_directive/mpl_examples/pylab_examples/clippedline.pdf deleted file mode 100644 index a77255d6da5..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/clippedline.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/clippedline.py b/plot_directive/mpl_examples/pylab_examples/clippedline.py deleted file mode 100644 index 03e67db1a24..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/cohere_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/cohere_demo.hires.png deleted file mode 100644 index 37c3b8ceac3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/cohere_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/cohere_demo.pdf b/plot_directive/mpl_examples/pylab_examples/cohere_demo.pdf deleted file mode 100644 index ae8b3a3ec30..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/cohere_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/cohere_demo.py b/plot_directive/mpl_examples/pylab_examples/cohere_demo.py deleted file mode 100644 index 52e0fc32a06..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/color_by_yvalue.hires.png b/plot_directive/mpl_examples/pylab_examples/color_by_yvalue.hires.png deleted file mode 100644 index 41117b114c4..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/color_by_yvalue.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/color_by_yvalue.pdf b/plot_directive/mpl_examples/pylab_examples/color_by_yvalue.pdf deleted file mode 100644 index 95e163f1447..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/color_by_yvalue.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/color_by_yvalue.py b/plot_directive/mpl_examples/pylab_examples/color_by_yvalue.py deleted file mode 100644 index 5d5eca36552..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/color_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/color_demo.hires.png deleted file mode 100644 index 31d2607c0ae..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/color_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/color_demo.pdf b/plot_directive/mpl_examples/pylab_examples/color_demo.pdf deleted file mode 100644 index 735a34d464f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/color_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/color_demo.py b/plot_directive/mpl_examples/pylab_examples/color_demo.py deleted file mode 100644 index c700ce3ef6a..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/colorbar_tick_labelling_demo.py b/plot_directive/mpl_examples/pylab_examples/colorbar_tick_labelling_demo.py deleted file mode 100644 index 16f6988e548..00000000000 --- a/plot_directive/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 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') -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') -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/plot_directive/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_00.hires.png deleted file mode 100644 index 29f5e29a346..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_00.pdf deleted file mode 100644 index e1ae106fc33..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_01.hires.png deleted file mode 100644 index 938e0a1c7e6..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_01.pdf deleted file mode 100644 index e7c176c3f15..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_demo.py b/plot_directive/mpl_examples/pylab_examples/contour_demo.py deleted file mode 100644 index 383986ff411..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/contour_demo.py +++ /dev/null @@ -1,104 +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') - - -# 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/plot_directive/mpl_examples/pylab_examples/contour_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/contour_demo_00.hires.png deleted file mode 100644 index 185281b1591..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/contour_demo_00.pdf deleted file mode 100644 index b471641d4f3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/contour_demo_01.hires.png deleted file mode 100644 index f76dee15c63..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/contour_demo_01.pdf deleted file mode 100644 index 4f70679b413..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_demo_02.hires.png b/plot_directive/mpl_examples/pylab_examples/contour_demo_02.hires.png deleted file mode 100644 index b5556e7099c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_demo_02.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_demo_02.pdf b/plot_directive/mpl_examples/pylab_examples/contour_demo_02.pdf deleted file mode 100644 index bfdca0abaac..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_demo_02.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_demo_03.hires.png b/plot_directive/mpl_examples/pylab_examples/contour_demo_03.hires.png deleted file mode 100644 index a211c501e51..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_demo_03.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_demo_03.pdf b/plot_directive/mpl_examples/pylab_examples/contour_demo_03.pdf deleted file mode 100644 index 9f6ac197491..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_demo_03.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_demo_04.hires.png b/plot_directive/mpl_examples/pylab_examples/contour_demo_04.hires.png deleted file mode 100644 index fb6a1346ec5..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_demo_04.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_demo_04.pdf b/plot_directive/mpl_examples/pylab_examples/contour_demo_04.pdf deleted file mode 100644 index 12444743159..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_demo_04.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_image.hires.png b/plot_directive/mpl_examples/pylab_examples/contour_image.hires.png deleted file mode 100644 index 5cc905042ad..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_image.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_image.pdf b/plot_directive/mpl_examples/pylab_examples/contour_image.pdf deleted file mode 100644 index 7abe2107942..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_image.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_image.py b/plot_directive/mpl_examples/pylab_examples/contour_image.py deleted file mode 100644 index c3d5ce26935..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/contour_image.py +++ /dev/null @@ -1,102 +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. - -figure() - - -subplot(2,2,1) - -cset1 = contourf(X, Y, Z, levels, - cmap=cm.get_cmap('jet', len(levels)-1), - ) -# 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) -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) -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) -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/plot_directive/mpl_examples/pylab_examples/contour_label_demo.py b/plot_directive/mpl_examples/pylab_examples/contour_label_demo.py deleted file mode 100644 index 8181b792ab2..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/contour_label_demo.py +++ /dev/null @@ -1,74 +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.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 -plt.clabel(CS, CS.levels, inline=True, fmt='%r %%', 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) - -################################################## -# Show the hole thing -################################################## -plt.show() diff --git a/plot_directive/mpl_examples/pylab_examples/contour_label_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/contour_label_demo_00.hires.png deleted file mode 100644 index bab3f017c41..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_label_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_label_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/contour_label_demo_00.pdf deleted file mode 100644 index 5c09cd7d90d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_label_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_label_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/contour_label_demo_01.hires.png deleted file mode 100644 index 7ba6fa44b7b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_label_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contour_label_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/contour_label_demo_01.pdf deleted file mode 100644 index 2f75cdedbea..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contour_label_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contourf_demo.py b/plot_directive/mpl_examples/pylab_examples/contourf_demo.py deleted file mode 100644 index 0a39bc94ea3..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/contourf_demo.py +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env python -from pylab import * -origin = 'lower' -#origin = 'upper' - -delta = 0.025 - -x = y = arange(-3.0, 3.01, 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 * (Z1 - Z2) - -nr, nc = Z.shape - -# put NaNs in one corner: -Z[-nr//6:, -nc//6:] = nan -# contourf will convert these to masked - - -Z = ma.array(Z) -# mask another corner: -Z[:nr//6, :nc//6] = ma.masked - -# mask a circle in the middle: -interior = sqrt((X**2) + (Y**2)) < 0.5 -Z[interior] = 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 = contourf(X, Y, Z, 10, # [-1, -0.1, 0, 0.1], - #alpha=0.5, - cmap=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 = contour(CS, levels=CS.levels[::2], - colors = 'r', - origin=origin, - hold='on') - -title('Nonsense (3 masked regions)') -xlabel('word length anomaly') -ylabel('sentence length anomaly') - -# Make a colorbar for the ContourSet returned by the contourf call. -cbar = colorbar(CS) -cbar.ax.set_ylabel('verbosity coefficient') -# Add the contour line levels to the colorbar -cbar.add_lines(CS2) - -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 = 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 = contour(X, Y, Z, levels, - colors = ('k',), - linewidths = (3,), - origin = origin) -title('Listed colors (3 masked regions)') -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. -colorbar(CS3) - -show() - diff --git a/plot_directive/mpl_examples/pylab_examples/contourf_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/contourf_demo_00.hires.png deleted file mode 100644 index c5f9897247a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contourf_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contourf_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/contourf_demo_00.pdf deleted file mode 100644 index 9ed07c7c414..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contourf_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contourf_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/contourf_demo_01.hires.png deleted file mode 100644 index e6c0e0cc6c6..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contourf_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contourf_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/contourf_demo_01.pdf deleted file mode 100644 index 6f4be512e7d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contourf_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contourf_log.hires.png b/plot_directive/mpl_examples/pylab_examples/contourf_log.hires.png deleted file mode 100644 index 2073aa98c5b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contourf_log.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contourf_log.pdf b/plot_directive/mpl_examples/pylab_examples/contourf_log.pdf deleted file mode 100644 index 49aaadb6ee5..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/contourf_log.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/contourf_log.py b/plot_directive/mpl_examples/pylab_examples/contourf_log.py deleted file mode 100644 index 81d3ad7a28b..00000000000 --- a/plot_directive/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 -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()) - -# 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/plot_directive/mpl_examples/pylab_examples/coords_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/coords_demo.hires.png deleted file mode 100644 index 02ee8d5752e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/coords_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/coords_demo.pdf b/plot_directive/mpl_examples/pylab_examples/coords_demo.pdf deleted file mode 100644 index a171084addb..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/coords_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/coords_demo.py b/plot_directive/mpl_examples/pylab_examples/coords_demo.py deleted file mode 100644 index 9349b6d7d02..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/coords_demo.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python -""" -An example of how to interact with the plotting canvas by connecting -to move and click events -""" -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', 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', 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/plot_directive/mpl_examples/pylab_examples/coords_report.hires.png b/plot_directive/mpl_examples/pylab_examples/coords_report.hires.png deleted file mode 100644 index 722f39a7103..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/coords_report.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/coords_report.pdf b/plot_directive/mpl_examples/pylab_examples/coords_report.pdf deleted file mode 100644 index 97f6bfcc0bf..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/coords_report.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/coords_report.py b/plot_directive/mpl_examples/pylab_examples/coords_report.py deleted file mode 100644 index 9710e887b82..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/csd_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/csd_demo.hires.png deleted file mode 100644 index 57724923d26..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/csd_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/csd_demo.pdf b/plot_directive/mpl_examples/pylab_examples/csd_demo.pdf deleted file mode 100644 index 265333db62d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/csd_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/csd_demo.py b/plot_directive/mpl_examples/pylab_examples/csd_demo.py deleted file mode 100644 index 86a4963d694..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/custom_cmap.hires.png b/plot_directive/mpl_examples/pylab_examples/custom_cmap.hires.png deleted file mode 100644 index 6ad4c9be1db..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/custom_cmap.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/custom_cmap.pdf b/plot_directive/mpl_examples/pylab_examples/custom_cmap.pdf deleted file mode 100644 index 318b84a8ddf..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/custom_cmap.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/custom_cmap.py b/plot_directive/mpl_examples/pylab_examples/custom_cmap.py deleted file mode 100644 index 8ab63243f14..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/custom_cmap.py +++ /dev/null @@ -1,168 +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)) - } - -# 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 - -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) - -plt.figure(figsize=(10,4)) -plt.subplots_adjust(wspace=0.3) - -plt.subplot(1,3,1) -plt.imshow(Z, interpolation='nearest', cmap=blue_red1) -plt.colorbar() - -plt.subplot(1,3,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' - -# Also see below for an alternative, particularly for -# interactive use. - -plt.subplot(1,3,3) -plt.imshow(Z, interpolation='nearest') -plt.colorbar() - -# Or as yet another variation, we could replace the rcParams -# specification *before* the imshow with the following *after* -# imshow: -# -# plt.set_cmap('BlueRed3') -# -# This sets the new default *and* sets the colormap of the last -# image-like item plotted via pyplot, if any. - - -plt.suptitle('Custom Blue-Red colormaps') - -plt.show() - diff --git a/plot_directive/mpl_examples/pylab_examples/custom_figure_class.hires.png b/plot_directive/mpl_examples/pylab_examples/custom_figure_class.hires.png deleted file mode 100644 index adad7e06550..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/custom_figure_class.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/custom_figure_class.pdf b/plot_directive/mpl_examples/pylab_examples/custom_figure_class.pdf deleted file mode 100644 index dfcab99aefd..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/custom_figure_class.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/custom_figure_class.py b/plot_directive/mpl_examples/pylab_examples/custom_figure_class.py deleted file mode 100644 index 95e72d8d1c7..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/custom_figure_class.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -You can pass a custom Figure constructor to figure if youy 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/plot_directive/mpl_examples/pylab_examples/custom_ticker1.hires.png b/plot_directive/mpl_examples/pylab_examples/custom_ticker1.hires.png deleted file mode 100644 index 27841e27919..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/custom_ticker1.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/custom_ticker1.pdf b/plot_directive/mpl_examples/pylab_examples/custom_ticker1.pdf deleted file mode 100644 index 6fa37b8e8d7..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/custom_ticker1.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/custom_ticker1.py b/plot_directive/mpl_examples/pylab_examples/custom_ticker1.py deleted file mode 100644 index 5ed31991531..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/custom_ticker1.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python - -""" -The new ticker code was designed to explicity support user customized -ticking. The documentation -http://matplotlib.sourceforge.net/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/plot_directive/mpl_examples/pylab_examples/customize_rc.hires.png b/plot_directive/mpl_examples/pylab_examples/customize_rc.hires.png deleted file mode 100644 index 5b89f5f0b7a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/customize_rc.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/customize_rc.pdf b/plot_directive/mpl_examples/pylab_examples/customize_rc.pdf deleted file mode 100644 index 6e0bde71b20..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/customize_rc.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/customize_rc.py b/plot_directive/mpl_examples/pylab_examples/customize_rc.py deleted file mode 100644 index ed2d8e7afa2..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/customize_rc.py +++ /dev/null @@ -1,51 +0,0 @@ - -""" -I'm not trying to make a good liking 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 linewith; 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/plot_directive/mpl_examples/pylab_examples/dannys_example.hires.png b/plot_directive/mpl_examples/pylab_examples/dannys_example.hires.png deleted file mode 100644 index 050712b33df..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/dannys_example.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/dannys_example.pdf b/plot_directive/mpl_examples/pylab_examples/dannys_example.pdf deleted file mode 100644 index 69f85ea3929..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/dannys_example.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/dannys_example.py b/plot_directive/mpl_examples/pylab_examples/dannys_example.py deleted file mode 100644 index 8d8adb56b2f..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/dash_control.hires.png b/plot_directive/mpl_examples/pylab_examples/dash_control.hires.png deleted file mode 100644 index f547f0493b9..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/dash_control.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/dash_control.pdf b/plot_directive/mpl_examples/pylab_examples/dash_control.pdf deleted file mode 100644 index ecbd9341baa..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/dash_control.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/dash_control.py b/plot_directive/mpl_examples/pylab_examples/dash_control.py deleted file mode 100644 index 1100882b887..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/dashpointlabel.hires.png b/plot_directive/mpl_examples/pylab_examples/dashpointlabel.hires.png deleted file mode 100644 index bc6bccead7a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/dashpointlabel.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/dashpointlabel.pdf b/plot_directive/mpl_examples/pylab_examples/dashpointlabel.pdf deleted file mode 100644 index e79b7d92d4a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/dashpointlabel.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/dashpointlabel.py b/plot_directive/mpl_examples/pylab_examples/dashpointlabel.py deleted file mode 100644 index d383ff66009..00000000000 --- a/plot_directive/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 xrange(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/plot_directive/mpl_examples/pylab_examples/data_helper.py b/plot_directive/mpl_examples/pylab_examples/data_helper.py deleted file mode 100644 index d58823c1489..00000000000 --- a/plot_directive/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', asfileobj=False) - file2 = cbook.get_sample_data('AAPL.dat', asfileobj=False) - M1 = fromstring( file(file1, 'rb').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/plot_directive/mpl_examples/pylab_examples/demo_agg_filter.hires.png b/plot_directive/mpl_examples/pylab_examples/demo_agg_filter.hires.png deleted file mode 100644 index 345aff2bc7c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/demo_agg_filter.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/demo_agg_filter.pdf b/plot_directive/mpl_examples/pylab_examples/demo_agg_filter.pdf deleted file mode 100644 index 946eb0cfabe..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/demo_agg_filter.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/demo_agg_filter.py b/plot_directive/mpl_examples/pylab_examples/demo_agg_filter.py deleted file mode 100644 index bd8d63b29cb..00000000000 --- a/plot_directive/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): - # copyed 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/plot_directive/mpl_examples/pylab_examples/demo_annotation_box.hires.png b/plot_directive/mpl_examples/pylab_examples/demo_annotation_box.hires.png deleted file mode 100644 index 9e5a8f5d05c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/demo_annotation_box.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/demo_annotation_box.pdf b/plot_directive/mpl_examples/pylab_examples/demo_annotation_box.pdf deleted file mode 100644 index 55a3799fe57..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/demo_annotation_box.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/demo_annotation_box.py b/plot_directive/mpl_examples/pylab_examples/demo_annotation_box.py deleted file mode 100644 index ea82bb53b13..00000000000 --- a/plot_directive/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("lena.png", asfileobj=False) - arr_lena = read_png(fn) - - imagebox = OffsetImage(arr_lena, zoom=0.2) - - ab = AnnotationBbox(imagebox, xy, - xybox=(120., -80.), - xycoords='data', - boxcoords="offset points", - pad=0.5, - arrowprops=dict(arrowstyle="->", - connectionstyle="angle,angleA=0,angleB=90,rad=3") - ) - - - ax.add_artist(ab) - - ax.set_xlim(0, 1) - ax.set_ylim(0, 1) - - - plt.draw() - plt.show() diff --git a/plot_directive/mpl_examples/pylab_examples/demo_bboximage.py b/plot_directive/mpl_examples/pylab_examples/demo_bboximage.py deleted file mode 100644 index e442fb70bc3..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/demo_ribbon_box.hires.png b/plot_directive/mpl_examples/pylab_examples/demo_ribbon_box.hires.png deleted file mode 100644 index 86aefd24acd..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/demo_ribbon_box.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/demo_ribbon_box.pdf b/plot_directive/mpl_examples/pylab_examples/demo_ribbon_box.pdf deleted file mode 100644 index 2a526567dfc..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/demo_ribbon_box.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/demo_ribbon_box.py b/plot_directive/mpl_examples/pylab_examples/demo_ribbon_box.py deleted file mode 100644 index 9ab0be183ec..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/demo_text_path.hires.png b/plot_directive/mpl_examples/pylab_examples/demo_text_path.hires.png deleted file mode 100644 index be0e2af104f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/demo_text_path.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/demo_text_path.pdf b/plot_directive/mpl_examples/pylab_examples/demo_text_path.pdf deleted file mode 100644 index 4a43930853f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/demo_text_path.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/demo_text_path.py b/plot_directive/mpl_examples/pylab_examples/demo_text_path.py deleted file mode 100644 index 730f91ffd27..00000000000 --- a/plot_directive/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("lena.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/plot_directive/mpl_examples/pylab_examples/demo_text_rotation_mode.hires.png b/plot_directive/mpl_examples/pylab_examples/demo_text_rotation_mode.hires.png deleted file mode 100644 index 88b19dd8007..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/demo_text_rotation_mode.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/demo_text_rotation_mode.pdf b/plot_directive/mpl_examples/pylab_examples/demo_text_rotation_mode.pdf deleted file mode 100644 index 3cd4e16cca5..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/demo_text_rotation_mode.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/demo_text_rotation_mode.py b/plot_directive/mpl_examples/pylab_examples/demo_text_rotation_mode.py deleted file mode 100644 index e32a89f7557..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/dolphin.hires.png b/plot_directive/mpl_examples/pylab_examples/dolphin.hires.png deleted file mode 100644 index 13ee33ef8c8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/dolphin.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/dolphin.pdf b/plot_directive/mpl_examples/pylab_examples/dolphin.pdf deleted file mode 100644 index 2c1fa5b3c22..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/dolphin.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/dolphin.py b/plot_directive/mpl_examples/pylab_examples/dolphin.py deleted file mode 100644 index f457ccc0c79..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/ellipse_collection.hires.png b/plot_directive/mpl_examples/pylab_examples/ellipse_collection.hires.png deleted file mode 100644 index d9cc9c1c743..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/ellipse_collection.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/ellipse_collection.pdf b/plot_directive/mpl_examples/pylab_examples/ellipse_collection.pdf deleted file mode 100644 index 0d9545de838..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/ellipse_collection.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/ellipse_collection.py b/plot_directive/mpl_examples/pylab_examples/ellipse_collection.py deleted file mode 100644 index bc228db77e8..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/ellipse_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/ellipse_demo.hires.png deleted file mode 100644 index 20df539ee6e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/ellipse_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/ellipse_demo.pdf b/plot_directive/mpl_examples/pylab_examples/ellipse_demo.pdf deleted file mode 100644 index 8b1167c2c44..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/ellipse_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/ellipse_demo.py b/plot_directive/mpl_examples/pylab_examples/ellipse_demo.py deleted file mode 100644 index a5479601568..00000000000 --- a/plot_directive/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 xrange(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/plot_directive/mpl_examples/pylab_examples/ellipse_rotated.hires.png b/plot_directive/mpl_examples/pylab_examples/ellipse_rotated.hires.png deleted file mode 100644 index 3eeb41065a1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/ellipse_rotated.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/ellipse_rotated.pdf b/plot_directive/mpl_examples/pylab_examples/ellipse_rotated.pdf deleted file mode 100644 index ad4d228047d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/ellipse_rotated.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/ellipse_rotated.py b/plot_directive/mpl_examples/pylab_examples/ellipse_rotated.py deleted file mode 100644 index 87814618fca..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/equal_aspect_ratio.hires.png b/plot_directive/mpl_examples/pylab_examples/equal_aspect_ratio.hires.png deleted file mode 100644 index 4606851d43b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/equal_aspect_ratio.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/equal_aspect_ratio.pdf b/plot_directive/mpl_examples/pylab_examples/equal_aspect_ratio.pdf deleted file mode 100644 index 47107e49b48..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/equal_aspect_ratio.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/equal_aspect_ratio.py b/plot_directive/mpl_examples/pylab_examples/equal_aspect_ratio.py deleted file mode 100644 index 2496d7c7c13..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/errorbar_demo.py b/plot_directive/mpl_examples/pylab_examples/errorbar_demo.py deleted file mode 100644 index c2d5ab0cae5..00000000000 --- a/plot_directive/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') -ax.set_title('Mixed sym., log y') - -fig.suptitle('Variable errorbars') - -plt.show() - diff --git a/plot_directive/mpl_examples/pylab_examples/errorbar_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/errorbar_demo_00.hires.png deleted file mode 100644 index 78b0f71dfd3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/errorbar_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/errorbar_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/errorbar_demo_00.pdf deleted file mode 100644 index c816b002bcc..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/errorbar_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/errorbar_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/errorbar_demo_01.hires.png deleted file mode 100644 index a76fae3c811..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/errorbar_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/errorbar_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/errorbar_demo_01.pdf deleted file mode 100644 index 2e130090f67..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/errorbar_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/errorbar_limits.py b/plot_directive/mpl_examples/pylab_examples/errorbar_limits.py deleted file mode 100644 index 12c491f6796..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/errorbar_limits_00.hires.png b/plot_directive/mpl_examples/pylab_examples/errorbar_limits_00.hires.png deleted file mode 100644 index 444e1914824..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/errorbar_limits_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/errorbar_limits_00.pdf b/plot_directive/mpl_examples/pylab_examples/errorbar_limits_00.pdf deleted file mode 100644 index f5a190054de..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/errorbar_limits_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/errorbar_limits_01.hires.png b/plot_directive/mpl_examples/pylab_examples/errorbar_limits_01.hires.png deleted file mode 100644 index 401a0af4aa9..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/errorbar_limits_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/errorbar_limits_01.pdf b/plot_directive/mpl_examples/pylab_examples/errorbar_limits_01.pdf deleted file mode 100644 index 645342af244..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/errorbar_limits_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fancyarrow_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/fancyarrow_demo.hires.png deleted file mode 100644 index 7ba90f01cd2..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fancyarrow_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fancyarrow_demo.pdf b/plot_directive/mpl_examples/pylab_examples/fancyarrow_demo.pdf deleted file mode 100644 index 296b13ee30b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fancyarrow_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fancyarrow_demo.py b/plot_directive/mpl_examples/pylab_examples/fancyarrow_demo.py deleted file mode 100644 index 4d3c4553419..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/fancybox_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/fancybox_demo.hires.png deleted file mode 100644 index b66fae0a48d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fancybox_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fancybox_demo.pdf b/plot_directive/mpl_examples/pylab_examples/fancybox_demo.pdf deleted file mode 100644 index b3475ddfab3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fancybox_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fancybox_demo.py b/plot_directive/mpl_examples/pylab_examples/fancybox_demo.py deleted file mode 100644 index 8ada31db380..00000000000 --- a/plot_directive/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 initiallization. - 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/plot_directive/mpl_examples/pylab_examples/fancybox_demo2.hires.png b/plot_directive/mpl_examples/pylab_examples/fancybox_demo2.hires.png deleted file mode 100644 index bb408b49a13..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fancybox_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fancybox_demo2.pdf b/plot_directive/mpl_examples/pylab_examples/fancybox_demo2.pdf deleted file mode 100644 index 70e198bd748..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fancybox_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fancybox_demo2.py b/plot_directive/mpl_examples/pylab_examples/fancybox_demo2.py deleted file mode 100644 index 43a04a876b6..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/fancytextbox_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/fancytextbox_demo.hires.png deleted file mode 100644 index 4e5b83c1b91..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fancytextbox_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fancytextbox_demo.pdf b/plot_directive/mpl_examples/pylab_examples/fancytextbox_demo.pdf deleted file mode 100644 index 186ff548dcb..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fancytextbox_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fancytextbox_demo.py b/plot_directive/mpl_examples/pylab_examples/fancytextbox_demo.py deleted file mode 100644 index 1bd54734263..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/figimage_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/figimage_demo.hires.png deleted file mode 100644 index efb30c05dc0..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/figimage_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/figimage_demo.pdf b/plot_directive/mpl_examples/pylab_examples/figimage_demo.pdf deleted file mode 100644 index 14ae6cb0d0b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/figimage_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/figimage_demo.py b/plot_directive/mpl_examples/pylab_examples/figimage_demo.py deleted file mode 100644 index dc86be33e0b..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/figlegend_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/figlegend_demo.hires.png deleted file mode 100644 index 4fca780b819..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/figlegend_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/figlegend_demo.pdf b/plot_directive/mpl_examples/pylab_examples/figlegend_demo.pdf deleted file mode 100644 index 49d24c43f8b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/figlegend_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/figlegend_demo.py b/plot_directive/mpl_examples/pylab_examples/figlegend_demo.py deleted file mode 100644 index 408d0cbb593..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/figure_title.hires.png b/plot_directive/mpl_examples/pylab_examples/figure_title.hires.png deleted file mode 100644 index 236a8d3d060..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/figure_title.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/figure_title.pdf b/plot_directive/mpl_examples/pylab_examples/figure_title.pdf deleted file mode 100644 index 4c2b0496dbc..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/figure_title.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/figure_title.py b/plot_directive/mpl_examples/pylab_examples/figure_title.py deleted file mode 100644 index e1253d87e95..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/fill_between_demo.py b/plot_directive/mpl_examples/pylab_examples/fill_between_demo.py deleted file mode 100644 index 1dd2dc2ea36..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/fill_between_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/fill_between_demo_00.hires.png deleted file mode 100644 index 8a79fb9dab6..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_between_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_between_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/fill_between_demo_00.pdf deleted file mode 100644 index c4125010f70..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_between_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_between_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/fill_between_demo_01.hires.png deleted file mode 100644 index 77d1de157da..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_between_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_between_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/fill_between_demo_01.pdf deleted file mode 100644 index a65e47eb81f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_between_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_between_demo_02.hires.png b/plot_directive/mpl_examples/pylab_examples/fill_between_demo_02.hires.png deleted file mode 100644 index 5fdcefde8c3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_between_demo_02.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_between_demo_02.pdf b/plot_directive/mpl_examples/pylab_examples/fill_between_demo_02.pdf deleted file mode 100644 index 541dd9555bd..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_between_demo_02.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_betweenx_demo.py b/plot_directive/mpl_examples/pylab_examples/fill_betweenx_demo.py deleted file mode 100644 index 799718b1d12..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/fill_betweenx_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/fill_betweenx_demo_00.hires.png deleted file mode 100644 index e6ddb3271b4..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_betweenx_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_betweenx_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/fill_betweenx_demo_00.pdf deleted file mode 100644 index b7a35f1a072..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_betweenx_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_betweenx_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/fill_betweenx_demo_01.hires.png deleted file mode 100644 index 7c997d7ab66..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_betweenx_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_betweenx_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/fill_betweenx_demo_01.pdf deleted file mode 100644 index 2dd2366a90d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_betweenx_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/fill_demo.hires.png deleted file mode 100644 index a73b9b40c27..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_demo.pdf b/plot_directive/mpl_examples/pylab_examples/fill_demo.pdf deleted file mode 100644 index 05c87db27b0..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_demo.py b/plot_directive/mpl_examples/pylab_examples/fill_demo.py deleted file mode 100644 index 1cfded4d60c..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/fill_demo2.hires.png b/plot_directive/mpl_examples/pylab_examples/fill_demo2.hires.png deleted file mode 100644 index 839e8861421..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_demo2.pdf b/plot_directive/mpl_examples/pylab_examples/fill_demo2.pdf deleted file mode 100644 index 028007468ae..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_demo2.py b/plot_directive/mpl_examples/pylab_examples/fill_demo2.py deleted file mode 100644 index 77b86d79017..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/fill_spiral.hires.png b/plot_directive/mpl_examples/pylab_examples/fill_spiral.hires.png deleted file mode 100644 index 4f85f54ed53..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_spiral.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_spiral.pdf b/plot_directive/mpl_examples/pylab_examples/fill_spiral.pdf deleted file mode 100644 index f6967175488..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fill_spiral.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fill_spiral.py b/plot_directive/mpl_examples/pylab_examples/fill_spiral.py deleted file mode 100644 index 0e7674c0594..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/filledmarker_demo.py b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo.py deleted file mode 100644 index b4f001512ff..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_00.hires.png deleted file mode 100644 index 6217aa83bb9..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_00.pdf deleted file mode 100644 index 6da2747dab0..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_01.hires.png deleted file mode 100644 index 13047e6369f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_01.pdf deleted file mode 100644 index d4214c3525e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_02.hires.png b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_02.hires.png deleted file mode 100644 index bcac701dfad..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_02.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_02.pdf b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_02.pdf deleted file mode 100644 index 49d16f91283..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_02.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_03.hires.png b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_03.hires.png deleted file mode 100644 index 81f05030006..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_03.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_03.pdf b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_03.pdf deleted file mode 100644 index 74bb9cd8d01..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_03.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_04.hires.png b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_04.hires.png deleted file mode 100644 index 36c17481a5d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_04.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_04.pdf b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_04.pdf deleted file mode 100644 index c6de1e66f4f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_04.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_05.hires.png b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_05.hires.png deleted file mode 100644 index 9872d323670..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_05.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_05.pdf b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_05.pdf deleted file mode 100644 index fa31a797fd3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_05.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_06.hires.png b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_06.hires.png deleted file mode 100644 index 5de3f5cab82..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_06.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_06.pdf b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_06.pdf deleted file mode 100644 index 5469609feca..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_06.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_07.hires.png b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_07.hires.png deleted file mode 100644 index ee983ff0290..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_07.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_07.pdf b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_07.pdf deleted file mode 100644 index 3614e5a6aca..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_07.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_08.hires.png b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_08.hires.png deleted file mode 100644 index 45bf87a8811..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_08.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_08.pdf b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_08.pdf deleted file mode 100644 index 0258e90af96..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_08.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_09.hires.png b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_09.hires.png deleted file mode 100644 index 1ff60ddfbf8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_09.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_09.pdf b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_09.pdf deleted file mode 100644 index 3976e4baab7..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_09.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_10.hires.png b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_10.hires.png deleted file mode 100644 index 4cb09c43809..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_10.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_10.pdf b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_10.pdf deleted file mode 100644 index 78b5c4351e1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_10.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_11.hires.png b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_11.hires.png deleted file mode 100644 index aaca7efff5c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_11.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_11.pdf b/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_11.pdf deleted file mode 100644 index c05bed37828..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/filledmarker_demo_11.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/finance_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/finance_demo.hires.png deleted file mode 100644 index d241a8cd3a1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/finance_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/finance_demo.pdf b/plot_directive/mpl_examples/pylab_examples/finance_demo.pdf deleted file mode 100644 index e0f991be4c0..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/finance_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/finance_demo.py b/plot_directive/mpl_examples/pylab_examples/finance_demo.py deleted file mode 100644 index 81aac7a2bd9..00000000000 --- a/plot_directive/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') # Eg, Jan 12 -dayFormatter = DateFormatter('%d') # Eg, 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/plot_directive/mpl_examples/pylab_examples/finance_work2.hires.png b/plot_directive/mpl_examples/pylab_examples/finance_work2.hires.png deleted file mode 100644 index 51bdaa137e3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/finance_work2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/finance_work2.pdf b/plot_directive/mpl_examples/pylab_examples/finance_work2.pdf deleted file mode 100644 index b0c56b01c2f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/finance_work2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/finance_work2.py b/plot_directive/mpl_examples/pylab_examples/finance_work2.py deleted file mode 100644 index f651d59ef48..00000000000 --- a/plot_directive/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 axies 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/plot_directive/mpl_examples/pylab_examples/findobj_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/findobj_demo.hires.png deleted file mode 100644 index d292b6dabc8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/findobj_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/findobj_demo.pdf b/plot_directive/mpl_examples/pylab_examples/findobj_demo.pdf deleted file mode 100644 index 05599969495..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/findobj_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/findobj_demo.py b/plot_directive/mpl_examples/pylab_examples/findobj_demo.py deleted file mode 100644 index 73e61f783bd..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/fonts_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/fonts_demo.hires.png deleted file mode 100644 index 52760c47bef..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fonts_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fonts_demo.pdf b/plot_directive/mpl_examples/pylab_examples/fonts_demo.pdf deleted file mode 100644 index 115ada6f4ef..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fonts_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fonts_demo.py b/plot_directive/mpl_examples/pylab_examples/fonts_demo.py deleted file mode 100644 index 562fb7f171e..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/fonts_demo_kw.hires.png b/plot_directive/mpl_examples/pylab_examples/fonts_demo_kw.hires.png deleted file mode 100644 index 4dcf5e3f9ec..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fonts_demo_kw.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fonts_demo_kw.pdf b/plot_directive/mpl_examples/pylab_examples/fonts_demo_kw.pdf deleted file mode 100644 index a412ee0d162..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/fonts_demo_kw.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/fonts_demo_kw.py b/plot_directive/mpl_examples/pylab_examples/fonts_demo_kw.py deleted file mode 100644 index 1ff331ff476..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/ganged_plots.hires.png b/plot_directive/mpl_examples/pylab_examples/ganged_plots.hires.png deleted file mode 100644 index 9b1e1d7565f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/ganged_plots.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/ganged_plots.pdf b/plot_directive/mpl_examples/pylab_examples/ganged_plots.pdf deleted file mode 100644 index 878db85092b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/ganged_plots.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/ganged_plots.py b/plot_directive/mpl_examples/pylab_examples/ganged_plots.py deleted file mode 100644 index cb45324cb2e..00000000000 --- a/plot_directive/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 bewtween 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/plot_directive/mpl_examples/pylab_examples/geo_demo.py b/plot_directive/mpl_examples/pylab_examples/geo_demo.py deleted file mode 100644 index d38b0e9cbff..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/gradient_bar.hires.png b/plot_directive/mpl_examples/pylab_examples/gradient_bar.hires.png deleted file mode 100644 index 74403908ff2..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/gradient_bar.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/gradient_bar.pdf b/plot_directive/mpl_examples/pylab_examples/gradient_bar.pdf deleted file mode 100644 index 0dc284e290d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/gradient_bar.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/gradient_bar.py b/plot_directive/mpl_examples/pylab_examples/gradient_bar.py deleted file mode 100644 index fb747157079..00000000000 --- a/plot_directive/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('normal') -show() diff --git a/plot_directive/mpl_examples/pylab_examples/griddata_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/griddata_demo.hires.png deleted file mode 100644 index f7a567122b0..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/griddata_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/griddata_demo.pdf b/plot_directive/mpl_examples/pylab_examples/griddata_demo.pdf deleted file mode 100644 index ff2bcb58d21..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/griddata_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/griddata_demo.py b/plot_directive/mpl_examples/pylab_examples/griddata_demo.py deleted file mode 100644 index a72ad3f00ac..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/griddata_demo.py +++ /dev/null @@ -1,40 +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.jet) -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/plot_directive/mpl_examples/pylab_examples/hatch_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/hatch_demo.hires.png deleted file mode 100644 index 0629cec74dd..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/hatch_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/hatch_demo.pdf b/plot_directive/mpl_examples/pylab_examples/hatch_demo.pdf deleted file mode 100644 index af9bd5b859d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/hatch_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/hatch_demo.py b/plot_directive/mpl_examples/pylab_examples/hatch_demo.py deleted file mode 100644 index 05a72975f47..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/hexbin_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/hexbin_demo.hires.png deleted file mode 100644 index a973db5dec8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/hexbin_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/hexbin_demo.pdf b/plot_directive/mpl_examples/pylab_examples/hexbin_demo.pdf deleted file mode 100644 index af767ca4b51..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/hexbin_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/hexbin_demo.py b/plot_directive/mpl_examples/pylab_examples/hexbin_demo.py deleted file mode 100644 index e6436a94130..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/hexbin_demo.py +++ /dev/null @@ -1,36 +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.cm as cm -import matplotlib.pyplot as plt - -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=cm.jet) -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=cm.jet) -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/plot_directive/mpl_examples/pylab_examples/hexbin_demo2.hires.png b/plot_directive/mpl_examples/pylab_examples/hexbin_demo2.hires.png deleted file mode 100644 index a97f4f19ff1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/hexbin_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/hexbin_demo2.pdf b/plot_directive/mpl_examples/pylab_examples/hexbin_demo2.pdf deleted file mode 100644 index 99e1031c152..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/hexbin_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/hexbin_demo2.py b/plot_directive/mpl_examples/pylab_examples/hexbin_demo2.py deleted file mode 100644 index bfa49e3d313..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/hexbin_demo2.py +++ /dev/null @@ -1,55 +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) -plt.axis([xmin, xmax, ymin, ymax]) -cb = plt.colorbar() -cb.set_label('mean value') - - -plt.subplot(212) -plt.hexbin(x,y, gridsize=gridsize) -plt.axis([xmin, xmax, ymin, ymax]) -cb = plt.colorbar() -cb.set_label('N observations') - -plt.show() - diff --git a/plot_directive/mpl_examples/pylab_examples/hist_colormapped.hires.png b/plot_directive/mpl_examples/pylab_examples/hist_colormapped.hires.png deleted file mode 100644 index aaab13ad46e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/hist_colormapped.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/hist_colormapped.pdf b/plot_directive/mpl_examples/pylab_examples/hist_colormapped.pdf deleted file mode 100644 index 38207f8456d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/hist_colormapped.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/hist_colormapped.py b/plot_directive/mpl_examples/pylab_examples/hist_colormapped.py deleted file mode 100644 index cce35e889fd..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/histogram_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/histogram_demo.hires.png deleted file mode 100644 index 4db7735a6b2..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/histogram_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/histogram_demo.pdf b/plot_directive/mpl_examples/pylab_examples/histogram_demo.pdf deleted file mode 100644 index b6f7f5cbe3c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/histogram_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/histogram_demo.py b/plot_directive/mpl_examples/pylab_examples/histogram_demo.py deleted file mode 100644 index 00919f78ea6..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended.py b/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended.py deleted file mode 100644 index 966cc7aaf32..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended.py +++ /dev/null @@ -1,110 +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='barstacked') - -# -# 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) -w0[: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/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_00.hires.png b/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_00.hires.png deleted file mode 100644 index a5e8e31f442..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_00.pdf b/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_00.pdf deleted file mode 100644 index 8c455ba242a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_01.hires.png b/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_01.hires.png deleted file mode 100644 index 4f3acb721f7..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_01.pdf b/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_01.pdf deleted file mode 100644 index 93e0ee79401..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_02.hires.png b/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_02.hires.png deleted file mode 100644 index dddb1473563..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_02.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_02.pdf b/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_02.pdf deleted file mode 100644 index 173e0a1658a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_02.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_03.hires.png b/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_03.hires.png deleted file mode 100644 index 692940786a3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_03.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_03.pdf b/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_03.pdf deleted file mode 100644 index f867794f362..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_03.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_04.hires.png b/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_04.hires.png deleted file mode 100644 index 6efafa12092..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_04.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_04.pdf b/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_04.pdf deleted file mode 100644 index f2e9abb9844..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_04.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_05.hires.png b/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_05.hires.png deleted file mode 100644 index 8bb819826d1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_05.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_05.pdf b/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_05.pdf deleted file mode 100644 index e72043c9eef..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/histogram_demo_extended_05.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/hline_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/hline_demo.hires.png deleted file mode 100644 index 2618d8e2da7..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/hline_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/hline_demo.pdf b/plot_directive/mpl_examples/pylab_examples/hline_demo.pdf deleted file mode 100644 index 23afd4da263..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/hline_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/hline_demo.py b/plot_directive/mpl_examples/pylab_examples/hline_demo.py deleted file mode 100644 index 8d02cca3e8f..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/image_clip_path.hires.png b/plot_directive/mpl_examples/pylab_examples/image_clip_path.hires.png deleted file mode 100644 index 5db87121994..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_clip_path.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_clip_path.pdf b/plot_directive/mpl_examples/pylab_examples/image_clip_path.pdf deleted file mode 100644 index 1560561f119..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_clip_path.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_clip_path.py b/plot_directive/mpl_examples/pylab_examples/image_clip_path.py deleted file mode 100644 index 64d4354e7ce..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/image_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/image_demo.hires.png deleted file mode 100644 index cc3a6dbd35d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_demo.pdf b/plot_directive/mpl_examples/pylab_examples/image_demo.pdf deleted file mode 100644 index 37f2cabb2c6..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_demo.py b/plot_directive/mpl_examples/pylab_examples/image_demo.py deleted file mode 100644 index d8d5c511127..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/image_demo.py +++ /dev/null @@ -1,18 +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.gray, - origin='lower', extent=[-3,3,-3,3]) - -plt.show() - diff --git a/plot_directive/mpl_examples/pylab_examples/image_demo2.hires.png b/plot_directive/mpl_examples/pylab_examples/image_demo2.hires.png deleted file mode 100644 index f897b61825c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_demo2.pdf b/plot_directive/mpl_examples/pylab_examples/image_demo2.pdf deleted file mode 100644 index 09ad21a4e3b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_demo2.py b/plot_directive/mpl_examples/pylab_examples/image_demo2.py deleted file mode 100644 index 50e994faf07..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/image_demo2.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python -from pylab import * -import matplotlib.cbook as cbook - -w, h = 512, 512 - -datafile = cbook.get_sample_data('ct.raw', asfileobj=False) -print 'loading', datafile -s = file(datafile, 'rb').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/plot_directive/mpl_examples/pylab_examples/image_demo3.hires.png b/plot_directive/mpl_examples/pylab_examples/image_demo3.hires.png deleted file mode 100644 index 66fbf7ca3d3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_demo3.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_demo3.pdf b/plot_directive/mpl_examples/pylab_examples/image_demo3.pdf deleted file mode 100644 index 876167b6723..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_demo3.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_demo3.py b/plot_directive/mpl_examples/pylab_examples/image_demo3.py deleted file mode 100644 index ba1c7011ae8..00000000000 --- a/plot_directive/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, exc: - 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, origin='lower') - -show() - diff --git a/plot_directive/mpl_examples/pylab_examples/image_interp.py b/plot_directive/mpl_examples/pylab_examples/image_interp.py deleted file mode 100644 index dff0e7c9631..00000000000 --- a/plot_directive/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. Eg, 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/plot_directive/mpl_examples/pylab_examples/image_interp_00.hires.png b/plot_directive/mpl_examples/pylab_examples/image_interp_00.hires.png deleted file mode 100644 index 29b30210490..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_interp_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_interp_00.pdf b/plot_directive/mpl_examples/pylab_examples/image_interp_00.pdf deleted file mode 100644 index a46ec88d3aa..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_interp_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_interp_01.hires.png b/plot_directive/mpl_examples/pylab_examples/image_interp_01.hires.png deleted file mode 100644 index 47d2b3e6b29..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_interp_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_interp_01.pdf b/plot_directive/mpl_examples/pylab_examples/image_interp_01.pdf deleted file mode 100644 index 9feed22f575..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_interp_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_interp_02.hires.png b/plot_directive/mpl_examples/pylab_examples/image_interp_02.hires.png deleted file mode 100644 index 6b84f5e43c6..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_interp_02.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_interp_02.pdf b/plot_directive/mpl_examples/pylab_examples/image_interp_02.pdf deleted file mode 100644 index 57eeeaddb14..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_interp_02.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_masked.hires.png b/plot_directive/mpl_examples/pylab_examples/image_masked.hires.png deleted file mode 100644 index ac04af14811..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_masked.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_masked.pdf b/plot_directive/mpl_examples/pylab_examples/image_masked.pdf deleted file mode 100644 index b8a63d7c097..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_masked.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_masked.py b/plot_directive/mpl_examples/pylab_examples/image_masked.py deleted file mode 100644 index 0a5e2599531..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/image_nonuniform.hires.png b/plot_directive/mpl_examples/pylab_examples/image_nonuniform.hires.png deleted file mode 100644 index 6b83ef60b02..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_nonuniform.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_nonuniform.pdf b/plot_directive/mpl_examples/pylab_examples/image_nonuniform.pdf deleted file mode 100644 index 01114a3465c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_nonuniform.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_nonuniform.py b/plot_directive/mpl_examples/pylab_examples/image_nonuniform.py deleted file mode 100644 index 1f3022377c8..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/image_nonuniform.py +++ /dev/null @@ -1,55 +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 - -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)) -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)) -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)) -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)) -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/plot_directive/mpl_examples/pylab_examples/image_origin.hires.png b/plot_directive/mpl_examples/pylab_examples/image_origin.hires.png deleted file mode 100644 index ed780ad6266..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_origin.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_origin.pdf b/plot_directive/mpl_examples/pylab_examples/image_origin.pdf deleted file mode 100644 index 571a9fe72d1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_origin.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_origin.py b/plot_directive/mpl_examples/pylab_examples/image_origin.py deleted file mode 100644 index 120dd795798..00000000000 --- a/plot_directive/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.sourceforge.net/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/plot_directive/mpl_examples/pylab_examples/image_slices_viewer.hires.png b/plot_directive/mpl_examples/pylab_examples/image_slices_viewer.hires.png deleted file mode 100644 index dd1644a36b1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_slices_viewer.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_slices_viewer.pdf b/plot_directive/mpl_examples/pylab_examples/image_slices_viewer.pdf deleted file mode 100644 index be7eb8ba19a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/image_slices_viewer.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/image_slices_viewer.py b/plot_directive/mpl_examples/pylab_examples/image_slices_viewer.py deleted file mode 100644 index c476c3dd628..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/image_slices_viewer.py +++ /dev/null @@ -1,45 +0,0 @@ -import numpy -from pylab import figure, show - - - - -class IndexTracker: - def __init__(self, ax, X): - self.ax = ax - ax.set_title('use scroll wheen 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 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/plot_directive/mpl_examples/pylab_examples/integral_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/integral_demo.hires.png deleted file mode 100644 index 5205ec258be..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/integral_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/integral_demo.pdf b/plot_directive/mpl_examples/pylab_examples/integral_demo.pdf deleted file mode 100644 index bcc2a530a26..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/integral_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/integral_demo.py b/plot_directive/mpl_examples/pylab_examples/integral_demo.py deleted file mode 100644 index a9b02262aba..00000000000 --- a/plot_directive/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)] + 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/plot_directive/mpl_examples/pylab_examples/interp_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/interp_demo.hires.png deleted file mode 100644 index ee22ea3b174..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/interp_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/interp_demo.pdf b/plot_directive/mpl_examples/pylab_examples/interp_demo.pdf deleted file mode 100644 index 998ff23114d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/interp_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/interp_demo.py b/plot_directive/mpl_examples/pylab_examples/interp_demo.py deleted file mode 100644 index 0f7375475d1..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/invert_axes.hires.png b/plot_directive/mpl_examples/pylab_examples/invert_axes.hires.png deleted file mode 100644 index 8c0a3cb14a5..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/invert_axes.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/invert_axes.pdf b/plot_directive/mpl_examples/pylab_examples/invert_axes.pdf deleted file mode 100644 index 2d5c9771222..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/invert_axes.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/invert_axes.py b/plot_directive/mpl_examples/pylab_examples/invert_axes.py deleted file mode 100644 index b8ae58d8b4c..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/layer_images.hires.png b/plot_directive/mpl_examples/pylab_examples/layer_images.hires.png deleted file mode 100644 index 074f37b96d7..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/layer_images.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/layer_images.pdf b/plot_directive/mpl_examples/pylab_examples/layer_images.pdf deleted file mode 100644 index 795b0df1f0c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/layer_images.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/layer_images.py b/plot_directive/mpl_examples/pylab_examples/layer_images.py deleted file mode 100644 index 8d50159aadb..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/legend_auto.py b/plot_directive/mpl_examples/pylab_examples/legend_auto.py deleted file mode 100644 index a29a746d13a..00000000000 --- a/plot_directive/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() - -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/plot_directive/mpl_examples/pylab_examples/legend_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/legend_demo.hires.png deleted file mode 100644 index 85d68f7a17f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/legend_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/legend_demo.pdf b/plot_directive/mpl_examples/pylab_examples/legend_demo.pdf deleted file mode 100644 index d95e55e8f7d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/legend_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/legend_demo.py b/plot_directive/mpl_examples/pylab_examples/legend_demo.py deleted file mode 100644 index 5151dfe203a..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/legend_demo.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -# Thanks to Charles Twardy for this example -# -#See http://matplotlib.sf.net/examples/legend_demo2.py for an example -#controlling which lines the legend uses and the order - -import numpy as np -import matplotlib.pyplot as plt - -a = np.arange(0,3,.02) -b = np.arange(0,3,.02) -c = np.exp(a) -d = c[::-1] - -ax = plt.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, fancybox=True) -plt.ylim([-1,20]) -plt.grid(False) -plt.xlabel('Model complexity --->') -plt.ylabel('Message length --->') -plt.title('Minimum Message Length') - -plt.setp(plt.gca(), 'yticklabels', []) -plt.setp(plt.gca(), 'xticklabels', []) - -# set some legend properties. All the code below is optional. The -# defaults are usually sensible but if you need more control, this -# shows you how -leg = plt.gca().get_legend() -ltext = leg.get_texts() # all the text.Text instance in the legend -llines = leg.get_lines() # all the lines.Line2D instance in the legend -frame = leg.get_frame() # the patch.Rectangle instance surrounding the legend - -# see text.Text, lines.Line2D, and patches.Rectangle for more info on -# the settable properties of lines, text, and rectangles -frame.set_facecolor('0.80') # set the frame face color to light gray -plt.setp(ltext, fontsize='small') # the legend text fontsize -plt.setp(llines, linewidth=1.5) # the legend linewidth -#leg.draw_frame(False) # don't draw the legend frame -plt.show() - - - diff --git a/plot_directive/mpl_examples/pylab_examples/legend_demo2.hires.png b/plot_directive/mpl_examples/pylab_examples/legend_demo2.hires.png deleted file mode 100644 index 85653299d23..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/legend_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/legend_demo2.pdf b/plot_directive/mpl_examples/pylab_examples/legend_demo2.pdf deleted file mode 100644 index 4142c413401..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/legend_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/legend_demo2.py b/plot_directive/mpl_examples/pylab_examples/legend_demo2.py deleted file mode 100644 index d8db01bc6f7..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/legend_demo2.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -# -# Make a legend for specific lines. -from pylab import * - -t1 = arange(0.0, 2.0, 0.1) -t2 = 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 inot l1 using tuple -# unpacking. So l1 is a Line2D instance, not a sequence of lines -l1, = plot(t2, exp(-t2)) -l2, l3 = plot(t2, sin(2*pi*t2), '--go', t1, log(1+t1), '.') -l4, = plot(t2, exp(-t2)*sin(2*pi*t2), 'rs-.') - -legend( (l2, l4), ('oscillatory', 'damped'), 'upper right', shadow=True) -xlabel('time') -ylabel('volts') -title('Damped oscillation') -#axis([0,2,-1,1]) -show() - - - diff --git a/plot_directive/mpl_examples/pylab_examples/legend_demo3.hires.png b/plot_directive/mpl_examples/pylab_examples/legend_demo3.hires.png deleted file mode 100644 index 4c97adb092a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/legend_demo3.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/legend_demo3.pdf b/plot_directive/mpl_examples/pylab_examples/legend_demo3.pdf deleted file mode 100644 index f74550a8e26..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/legend_demo3.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/legend_demo3.py b/plot_directive/mpl_examples/pylab_examples/legend_demo3.py deleted file mode 100644 index 77e2e0f9902..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/legend_scatter.hires.png b/plot_directive/mpl_examples/pylab_examples/legend_scatter.hires.png deleted file mode 100644 index ffedb059935..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/legend_scatter.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/legend_scatter.pdf b/plot_directive/mpl_examples/pylab_examples/legend_scatter.pdf deleted file mode 100644 index 8cdcf5360af..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/legend_scatter.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/legend_scatter.py b/plot_directive/mpl_examples/pylab_examples/legend_scatter.py deleted file mode 100644 index 81eb32e37b4..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/legend_translucent.hires.png b/plot_directive/mpl_examples/pylab_examples/legend_translucent.hires.png deleted file mode 100644 index bc1423f64d8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/legend_translucent.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/legend_translucent.pdf b/plot_directive/mpl_examples/pylab_examples/legend_translucent.pdf deleted file mode 100644 index 25fcdaf45af..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/legend_translucent.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/legend_translucent.py b/plot_directive/mpl_examples/pylab_examples/legend_translucent.py deleted file mode 100644 index 577b0f96cfe..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/line_collection.hires.png b/plot_directive/mpl_examples/pylab_examples/line_collection.hires.png deleted file mode 100644 index 114ccf82830..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/line_collection.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/line_collection.pdf b/plot_directive/mpl_examples/pylab_examples/line_collection.pdf deleted file mode 100644 index b4c91be2d27..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/line_collection.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/line_collection.py b/plot_directive/mpl_examples/pylab_examples/line_collection.py deleted file mode 100644 index 716d6d4a4c7..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/line_collection2.hires.png b/plot_directive/mpl_examples/pylab_examples/line_collection2.hires.png deleted file mode 100644 index a95f1468c1c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/line_collection2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/line_collection2.pdf b/plot_directive/mpl_examples/pylab_examples/line_collection2.pdf deleted file mode 100644 index 8843fd34c16..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/line_collection2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/line_collection2.py b/plot_directive/mpl_examples/pylab_examples/line_collection2.py deleted file mode 100644 index 03ef6eae10a..00000000000 --- a/plot_directive/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([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/plot_directive/mpl_examples/pylab_examples/line_styles.hires.png b/plot_directive/mpl_examples/pylab_examples/line_styles.hires.png deleted file mode 100644 index 29eea66512a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/line_styles.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/line_styles.pdf b/plot_directive/mpl_examples/pylab_examples/line_styles.pdf deleted file mode 100644 index cdc0586855f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/line_styles.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/line_styles.py b/plot_directive/mpl_examples/pylab_examples/line_styles.py deleted file mode 100644 index fdde90ee41a..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/load_converter.hires.png b/plot_directive/mpl_examples/pylab_examples/load_converter.hires.png deleted file mode 100644 index 2f318fdc1ac..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/load_converter.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/load_converter.pdf b/plot_directive/mpl_examples/pylab_examples/load_converter.pdf deleted file mode 100644 index b7205ff4bad..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/load_converter.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/load_converter.py b/plot_directive/mpl_examples/pylab_examples/load_converter.py deleted file mode 100644 index ec4523617a2..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/load_converter.py +++ /dev/null @@ -1,19 +0,0 @@ -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/plot_directive/mpl_examples/pylab_examples/loadrec.hires.png b/plot_directive/mpl_examples/pylab_examples/loadrec.hires.png deleted file mode 100644 index 82643bf2eb4..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/loadrec.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/loadrec.pdf b/plot_directive/mpl_examples/pylab_examples/loadrec.pdf deleted file mode 100644 index 3f18f585f5a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/loadrec.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/loadrec.py b/plot_directive/mpl_examples/pylab_examples/loadrec.py deleted file mode 100644 index 74fa34a5785..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/loadrec.py +++ /dev/null @@ -1,19 +0,0 @@ -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 -import mpl_toolkits.exceltools as exceltools -exceltools.rec2excel(a, 'test.xls') -show() diff --git a/plot_directive/mpl_examples/pylab_examples/log_bar.hires.png b/plot_directive/mpl_examples/pylab_examples/log_bar.hires.png deleted file mode 100644 index 313d62406f4..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/log_bar.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/log_bar.pdf b/plot_directive/mpl_examples/pylab_examples/log_bar.pdf deleted file mode 100644 index 67a5032e8b2..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/log_bar.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/log_bar.py b/plot_directive/mpl_examples/pylab_examples/log_bar.py deleted file mode 100644 index feabfaed0b4..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/log_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/log_demo.hires.png deleted file mode 100644 index 0d9c1bc88cc..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/log_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/log_demo.pdf b/plot_directive/mpl_examples/pylab_examples/log_demo.pdf deleted file mode 100644 index ca545ec9d94..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/log_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/log_demo.py b/plot_directive/mpl_examples/pylab_examples/log_demo.py deleted file mode 100644 index b5f2a03bb13..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/log_test.hires.png b/plot_directive/mpl_examples/pylab_examples/log_test.hires.png deleted file mode 100644 index bcdc45b1f41..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/log_test.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/log_test.pdf b/plot_directive/mpl_examples/pylab_examples/log_test.pdf deleted file mode 100644 index 5df7320f24f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/log_test.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/log_test.py b/plot_directive/mpl_examples/pylab_examples/log_test.py deleted file mode 100644 index 55d9cc75323..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/logo.hires.png b/plot_directive/mpl_examples/pylab_examples/logo.hires.png deleted file mode 100644 index 6fd153f6d87..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/logo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/logo.pdf b/plot_directive/mpl_examples/pylab_examples/logo.pdf deleted file mode 100644 index a34ae082945..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/logo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/logo.py b/plot_directive/mpl_examples/pylab_examples/logo.py deleted file mode 100644 index 64e97c7b013..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/logo.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -# This file generates the matplotlib web page logo -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/plot_directive/mpl_examples/pylab_examples/major_minor_demo1.hires.png b/plot_directive/mpl_examples/pylab_examples/major_minor_demo1.hires.png deleted file mode 100644 index cb9f34c33b8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/major_minor_demo1.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/major_minor_demo1.pdf b/plot_directive/mpl_examples/pylab_examples/major_minor_demo1.pdf deleted file mode 100644 index 26a769af8b5..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/major_minor_demo1.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/major_minor_demo1.py b/plot_directive/mpl_examples/pylab_examples/major_minor_demo1.py deleted file mode 100644 index 562fd971237..00000000000 --- a/plot_directive/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 chnages 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/plot_directive/mpl_examples/pylab_examples/major_minor_demo2.hires.png b/plot_directive/mpl_examples/pylab_examples/major_minor_demo2.hires.png deleted file mode 100644 index 75f919bead3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/major_minor_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/major_minor_demo2.pdf b/plot_directive/mpl_examples/pylab_examples/major_minor_demo2.pdf deleted file mode 100644 index 944866fd182..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/major_minor_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/major_minor_demo2.py b/plot_directive/mpl_examples/pylab_examples/major_minor_demo2.py deleted file mode 100644 index 43de86e24f3..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/major_minor_demo2.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -""" -Set the major ticks on the ints and minor ticks on multiples of 0.2 -""" - -from pylab import * -from matplotlib.ticker import MultipleLocator, FormatStrFormatter - -majorLocator = MultipleLocator(1) -majorFormatter = FormatStrFormatter('%d') -minorLocator = MultipleLocator(.2) - - -t = arange(0.0, 10.0, 0.01) -s = sin(2*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/plot_directive/mpl_examples/pylab_examples/manual_axis.hires.png b/plot_directive/mpl_examples/pylab_examples/manual_axis.hires.png deleted file mode 100644 index 41525e53834..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/manual_axis.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/manual_axis.pdf b/plot_directive/mpl_examples/pylab_examples/manual_axis.pdf deleted file mode 100644 index 69d2ba0c184..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/manual_axis.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/manual_axis.py b/plot_directive/mpl_examples/pylab_examples/manual_axis.py deleted file mode 100644 index b6f7ee1d11f..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/manual_axis.py +++ /dev/null @@ -1,58 +0,0 @@ -""" -The techniques here are no longer required with the new support for -spines in matplotlib -- see -http://matplotlib.sourceforge.net/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/plot_directive/mpl_examples/pylab_examples/masked_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/masked_demo.hires.png deleted file mode 100644 index 2f0fac5c2be..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/masked_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/masked_demo.pdf b/plot_directive/mpl_examples/pylab_examples/masked_demo.pdf deleted file mode 100644 index 95a1c4cbd51..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/masked_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/masked_demo.py b/plot_directive/mpl_examples/pylab_examples/masked_demo.py deleted file mode 100644 index 66dda5a5082..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/mathtext_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/mathtext_demo.hires.png deleted file mode 100644 index 53951395326..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/mathtext_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/mathtext_demo.pdf b/plot_directive/mpl_examples/pylab_examples/mathtext_demo.pdf deleted file mode 100644 index 057174aff3f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/mathtext_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/mathtext_demo.py b/plot_directive/mpl_examples/pylab_examples/mathtext_demo.py deleted file mode 100644 index 333816cdbeb..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/mathtext_examples.hires.png b/plot_directive/mpl_examples/pylab_examples/mathtext_examples.hires.png deleted file mode 100644 index 20db52e0fc3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/mathtext_examples.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/mathtext_examples.pdf b/plot_directive/mpl_examples/pylab_examples/mathtext_examples.pdf deleted file mode 100644 index 11ad88b4398..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/mathtext_examples.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/mathtext_examples.py b/plot_directive/mpl_examples/pylab_examples/mathtext_examples.py deleted file mode 100644 index f62c61f56e0..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/mathtext_examples.py +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env python - -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/plot_directive/mpl_examples/pylab_examples/multicolored_line.py b/plot_directive/mpl_examples/pylab_examples/multicolored_line.py deleted file mode 100644 index 85f7a40923d..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/multicolored_line_00.hires.png b/plot_directive/mpl_examples/pylab_examples/multicolored_line_00.hires.png deleted file mode 100644 index 9024d80d798..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/multicolored_line_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/multicolored_line_00.pdf b/plot_directive/mpl_examples/pylab_examples/multicolored_line_00.pdf deleted file mode 100644 index 05e651984aa..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/multicolored_line_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/multicolored_line_01.hires.png b/plot_directive/mpl_examples/pylab_examples/multicolored_line_01.hires.png deleted file mode 100644 index 3fa23a8a2a4..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/multicolored_line_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/multicolored_line_01.pdf b/plot_directive/mpl_examples/pylab_examples/multicolored_line_01.pdf deleted file mode 100644 index e2bdfb98a36..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/multicolored_line_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/multiline.hires.png b/plot_directive/mpl_examples/pylab_examples/multiline.hires.png deleted file mode 100644 index 0ce25acb952..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/multiline.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/multiline.pdf b/plot_directive/mpl_examples/pylab_examples/multiline.pdf deleted file mode 100644 index 60a1cbffca8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/multiline.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/multiline.py b/plot_directive/mpl_examples/pylab_examples/multiline.py deleted file mode 100644 index f5e62e8dd5d..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/multipage_pdf.py b/plot_directive/mpl_examples/pylab_examples/multipage_pdf.py deleted file mode 100644 index 9f385da877c..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/multiple_figs_demo.py b/plot_directive/mpl_examples/pylab_examples/multiple_figs_demo.py deleted file mode 100644 index ebd288021a5..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/multiple_figs_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/multiple_figs_demo_00.hires.png deleted file mode 100644 index 94902a0bb54..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/multiple_figs_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/multiple_figs_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/multiple_figs_demo_00.pdf deleted file mode 100644 index 773fd07da07..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/multiple_figs_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/multiple_figs_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/multiple_figs_demo_01.hires.png deleted file mode 100644 index f752ca28687..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/multiple_figs_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/multiple_figs_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/multiple_figs_demo_01.pdf deleted file mode 100644 index 9317ddb4c4b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/multiple_figs_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/multiple_yaxis_with_spines.hires.png b/plot_directive/mpl_examples/pylab_examples/multiple_yaxis_with_spines.hires.png deleted file mode 100644 index fad6af63bfe..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/multiple_yaxis_with_spines.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/multiple_yaxis_with_spines.pdf b/plot_directive/mpl_examples/pylab_examples/multiple_yaxis_with_spines.pdf deleted file mode 100644 index 6f27dfbff51..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/multiple_yaxis_with_spines.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/multiple_yaxis_with_spines.py b/plot_directive/mpl_examples/pylab_examples/multiple_yaxis_with_spines.py deleted file mode 100644 index 66da6241ccf..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/multiple_yaxis_with_spines.py +++ /dev/null @@ -1,66 +0,0 @@ -import matplotlib.pyplot as plt - -def make_patch_spines_invisible(ax): - par2.set_frame_on(True) - par2.patch.set_visible(False) - for sp in par2.spines.itervalues(): - sp.set_visible(False) - -def make_spine_invisible(ax, direction): - if direction in ["right", "left"]: - ax.yaxis.set_ticks_position(direction) - ax.yaxis.set_label_position(direction) - elif direction in ["top", "bottom"]: - ax.xaxis.set_ticks_position(direction) - ax.xaxis.set_label_position(direction) - else: - raise ValueError("Unknown Direction : %s" % (direction,)) - - ax.spines[direction].set_visible(True) - - -if 1: - fig = plt.figure(1) - - host = fig.add_subplot(111) - - host.set_xlabel("Distance") - - par1 = host.twinx() - par2 = host.twinx() - - par2.spines["right"].set_position(("axes", 1.2)) - make_patch_spines_invisible(par2) - make_spine_invisible(par2, "right") - - plt.subplots_adjust(right=0.75) - - - 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/plot_directive/mpl_examples/pylab_examples/nan_test.hires.png b/plot_directive/mpl_examples/pylab_examples/nan_test.hires.png deleted file mode 100644 index 1870844410d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/nan_test.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/nan_test.pdf b/plot_directive/mpl_examples/pylab_examples/nan_test.pdf deleted file mode 100644 index 4894a1ff73c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/nan_test.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/nan_test.py b/plot_directive/mpl_examples/pylab_examples/nan_test.py deleted file mode 100644 index cc5c0bf90bb..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo.py b/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo.py deleted file mode 100644 index e2d0209b166..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_00.hires.png deleted file mode 100644 index b36b44b3052..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_00.pdf deleted file mode 100644 index 5abc05f8149..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_01.hires.png deleted file mode 100644 index 7e868de373a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_01.pdf deleted file mode 100644 index cf4b36dffa7..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_02.hires.png b/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_02.hires.png deleted file mode 100644 index c11716c2085..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_02.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_02.pdf b/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_02.pdf deleted file mode 100644 index e4ba7cb434f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_02.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_03.hires.png b/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_03.hires.png deleted file mode 100644 index c161718dfe6..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_03.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_03.pdf b/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_03.pdf deleted file mode 100644 index c998c336038..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/newscalarformatter_demo_03.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/patheffect_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/patheffect_demo.hires.png deleted file mode 100644 index b52cda630d6..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/patheffect_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/patheffect_demo.pdf b/plot_directive/mpl_examples/pylab_examples/patheffect_demo.pdf deleted file mode 100644 index 796c83e8150..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/patheffect_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/patheffect_demo.py b/plot_directive/mpl_examples/pylab_examples/patheffect_demo.py deleted file mode 100644 index 665b9dc8fcc..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/pcolor_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/pcolor_demo.hires.png deleted file mode 100644 index 249b734d092..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/pcolor_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/pcolor_demo.pdf b/plot_directive/mpl_examples/pylab_examples/pcolor_demo.pdf deleted file mode 100644 index e8dfdbe0f0a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/pcolor_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/pcolor_demo.py b/plot_directive/mpl_examples/pylab_examples/pcolor_demo.py deleted file mode 100644 index ee0e3da51c7..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/pcolor_demo.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python -""" -See pcolor_demo2 for an alternative way of generating pcolor plots -using imshow that is likely faster for large grids -""" -from __future__ import division -from matplotlib.patches import Patch -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.0001, dx) -y = arange(-3.0, 3.0001, dy) -X,Y = meshgrid(x, y) - -Z = func3(X, Y) -pcolor(X, Y, Z) -colorbar() -axis([-3,3,-3,3]) - -show() - - diff --git a/plot_directive/mpl_examples/pylab_examples/pcolor_demo2.hires.png b/plot_directive/mpl_examples/pylab_examples/pcolor_demo2.hires.png deleted file mode 100644 index 027c7e448de..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/pcolor_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/pcolor_demo2.pdf b/plot_directive/mpl_examples/pylab_examples/pcolor_demo2.pdf deleted file mode 100644 index c0ffa7193e6..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/pcolor_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/pcolor_demo2.py b/plot_directive/mpl_examples/pylab_examples/pcolor_demo2.py deleted file mode 100644 index e917d091c53..00000000000 --- a/plot_directive/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.jet) -#im.set_interpolation('nearest') -#im.set_interpolation('bicubic') -im.set_interpolation('bilinear') -#ax.set_image_extent(-3, 3, -3, 3) - -show() - - diff --git a/plot_directive/mpl_examples/pylab_examples/pcolor_log.hires.png b/plot_directive/mpl_examples/pylab_examples/pcolor_log.hires.png deleted file mode 100644 index 5f64919228a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/pcolor_log.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/pcolor_log.pdf b/plot_directive/mpl_examples/pylab_examples/pcolor_log.pdf deleted file mode 100644 index dbf4f600b15..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/pcolor_log.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/pcolor_log.py b/plot_directive/mpl_examples/pylab_examples/pcolor_log.py deleted file mode 100644 index 163ce0814bd..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/pcolor_log.py +++ /dev/null @@ -1,27 +0,0 @@ -from pylab import * - -from matplotlib.colors import LogNorm - - -N = 100 -x = linspace(-3.0, 3.0, N) -y = linspace(-2.0, 2.0, N) - -X, Y = 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. -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) - -subplot(2,1,1) -pcolor(X, Y, Z1, norm=LogNorm(vmin=Z1.min(), vmax=Z1.max())) -colorbar() - -subplot(2,1,2) -pcolor(X, Y, Z1) -colorbar() - - -show() - diff --git a/plot_directive/mpl_examples/pylab_examples/pcolor_small.hires.png b/plot_directive/mpl_examples/pylab_examples/pcolor_small.hires.png deleted file mode 100644 index 542848d6ca5..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/pcolor_small.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/pcolor_small.pdf b/plot_directive/mpl_examples/pylab_examples/pcolor_small.pdf deleted file mode 100644 index 26130211a2d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/pcolor_small.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/pcolor_small.py b/plot_directive/mpl_examples/pylab_examples/pcolor_small.py deleted file mode 100644 index b957b463502..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/pcolor_small.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python - -from pylab import * - -Z = rand(6,10) - -subplot(2,1,1) -c = pcolor(Z) -title('default: no edges') - -subplot(2,1,2) -c = pcolor(Z, edgecolors='k', linewidths=4) -title('thick edges') - -show() diff --git a/plot_directive/mpl_examples/pylab_examples/pie_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/pie_demo.hires.png deleted file mode 100644 index 530a6bf5f6e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/pie_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/pie_demo.pdf b/plot_directive/mpl_examples/pylab_examples/pie_demo.pdf deleted file mode 100644 index 98cefc88711..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/pie_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/pie_demo.py b/plot_directive/mpl_examples/pylab_examples/pie_demo.py deleted file mode 100644 index 29e061e1807..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/pie_demo.py +++ /dev/null @@ -1,25 +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" -and adding a shadow. - -Requires matplotlib0-0.70 or later - -""" -from pylab import * - -# make a square figure and axes -figure(1, figsize=(6,6)) -ax = 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) -pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True) -title('Raining Hogs and Dogs', bbox={'facecolor':'0.8', 'pad':5}) - -show() diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo.py b/plot_directive/mpl_examples/pylab_examples/plotfile_demo.py deleted file mode 100644 index 04b94665c16..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/plotfile_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_00.hires.png deleted file mode 100644 index 80468d3e669..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_00.pdf deleted file mode 100644 index ed9672bdd7b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_01.hires.png deleted file mode 100644 index 80468d3e669..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_01.pdf deleted file mode 100644 index ed9672bdd7b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_02.hires.png b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_02.hires.png deleted file mode 100644 index 207257adc7c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_02.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_02.pdf b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_02.pdf deleted file mode 100644 index 2ba03656400..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_02.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_03.hires.png b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_03.hires.png deleted file mode 100644 index 207257adc7c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_03.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_03.pdf b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_03.pdf deleted file mode 100644 index 2ba03656400..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_03.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_04.hires.png b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_04.hires.png deleted file mode 100644 index e777445ddfe..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_04.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_04.pdf b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_04.pdf deleted file mode 100644 index 5dfe813b6c4..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_04.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_05.hires.png b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_05.hires.png deleted file mode 100644 index 88d8f588e09..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_05.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_05.pdf b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_05.pdf deleted file mode 100644 index ad7b72d5418..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_05.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_06.hires.png b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_06.hires.png deleted file mode 100644 index f615f7637f1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_06.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_06.pdf b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_06.pdf deleted file mode 100644 index 3f351d314a3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_06.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_07.hires.png b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_07.hires.png deleted file mode 100644 index a291d489e8c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_07.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_07.pdf b/plot_directive/mpl_examples/pylab_examples/plotfile_demo_07.pdf deleted file mode 100644 index 9672711c49b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/plotfile_demo_07.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/polar_bar.hires.png b/plot_directive/mpl_examples/pylab_examples/polar_bar.hires.png deleted file mode 100644 index 8e683611fae..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/polar_bar.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/polar_bar.pdf b/plot_directive/mpl_examples/pylab_examples/polar_bar.pdf deleted file mode 100644 index 7679a49f8d8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/polar_bar.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/polar_bar.py b/plot_directive/mpl_examples/pylab_examples/polar_bar.py deleted file mode 100644 index 14d8d7de0b4..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/polar_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/polar_demo.hires.png deleted file mode 100644 index e4fcd87971d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/polar_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/polar_demo.pdf b/plot_directive/mpl_examples/pylab_examples/polar_demo.pdf deleted file mode 100644 index 681ff6a0d19..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/polar_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/polar_demo.py b/plot_directive/mpl_examples/pylab_examples/polar_demo.py deleted file mode 100644 index 35c91c02d5b..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/polar_demo.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env python -# -# matplotlib now has a PolarAxes class and a polar function in the -# matplotlib interface. This is considered alpha and the interface -# may change as we work out how polar axes should best be integrated -# -# The only function that has been tested on polar axes is "plot" (the -# pylab interface function "polar" calls ax.plot where ax is a -# PolarAxes) -- other axes plotting functions may work on PolarAxes -# but haven't been tested and may need tweaking. -# -# you can get get a PolarSubplot instance by doing, for example -# -# subplot(211, polar=True) -# -# or a PolarAxes instance by doing -# axes([left, bottom, width, height], polar=True) -# -# The view limits (eg xlim and ylim) apply to the lower left and upper -# right of the rectangular box that surrounds to polar axes. Eg if -# you have -# -# r = arange(0,1,0.01) -# theta = 2*pi*r -# -# the lower left corner is 5/4pi, sqrt(2) and the -# upper right corner is 1/4pi, sqrt(2) -# -# you could change the radial bounding box (zoom out) by setting the -# ylim (radial coordinate is the second argument to the plot command, -# as in MATLAB, though this is not advised currently because it is not -# clear to me how the axes should behave in the change of view limits. -# Please advise me if you have opinions. Likewise, the pan/zoom -# controls probably do not do what you think they do and are better -# left alone on polar axes. Perhaps I will disable them for polar -# axes unless we come up with a meaningful, useful and functional -# implementation for them. -# -# See the pylab rgrids and thetagrids functions for -# information on how to customize the grid locations and labels -import matplotlib -import numpy as np -from matplotlib.pyplot import figure, show, rc, grid - -# 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 -width, height = matplotlib.rcParams['figure.figsize'] -size = min(width, height) -# make a square figure -fig = figure(figsize=(size, size)) -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) -ax.set_rmax(2.0) -grid(True) - -ax.set_title("And there was much rejoicing!", fontsize=20) -show() diff --git a/plot_directive/mpl_examples/pylab_examples/polar_legend.hires.png b/plot_directive/mpl_examples/pylab_examples/polar_legend.hires.png deleted file mode 100644 index c6ec8bfb98d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/polar_legend.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/polar_legend.pdf b/plot_directive/mpl_examples/pylab_examples/polar_legend.pdf deleted file mode 100644 index e0d26568c73..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/polar_legend.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/polar_legend.py b/plot_directive/mpl_examples/pylab_examples/polar_legend.py deleted file mode 100644 index 12bf5dd653e..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/polar_scatter.hires.png b/plot_directive/mpl_examples/pylab_examples/polar_scatter.hires.png deleted file mode 100644 index 81a57e467a2..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/polar_scatter.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/polar_scatter.pdf b/plot_directive/mpl_examples/pylab_examples/polar_scatter.pdf deleted file mode 100644 index f55d80ea978..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/polar_scatter.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/polar_scatter.py b/plot_directive/mpl_examples/pylab_examples/polar_scatter.py deleted file mode 100644 index 7af26d5b8db..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/polar_scatter.py +++ /dev/null @@ -1,18 +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 correctlu). In a real example, this would be wasting -# dimensionlaity 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) -c.set_alpha(0.75) - - -show() diff --git a/plot_directive/mpl_examples/pylab_examples/poormans_contour.hires.png b/plot_directive/mpl_examples/pylab_examples/poormans_contour.hires.png deleted file mode 100644 index fc1a602cc70..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/poormans_contour.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/poormans_contour.pdf b/plot_directive/mpl_examples/pylab_examples/poormans_contour.pdf deleted file mode 100644 index 18fe4f42617..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/poormans_contour.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/poormans_contour.py b/plot_directive/mpl_examples/pylab_examples/poormans_contour.py deleted file mode 100644 index a1e5b05d7df..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/poormans_contour.py +++ /dev/null @@ -1,28 +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('jet', 10) # 10 discrete colors - -im = imshow(Z, cmap=cmap, interpolation='bilinear') -axis('off') -colorbar() - -show() - diff --git a/plot_directive/mpl_examples/pylab_examples/psd_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/psd_demo.hires.png deleted file mode 100644 index c32a79afca4..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/psd_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/psd_demo.pdf b/plot_directive/mpl_examples/pylab_examples/psd_demo.pdf deleted file mode 100644 index 31acb320613..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/psd_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/psd_demo.py b/plot_directive/mpl_examples/pylab_examples/psd_demo.py deleted file mode 100644 index d0a0521885f..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/psd_demo2.hires.png b/plot_directive/mpl_examples/pylab_examples/psd_demo2.hires.png deleted file mode 100644 index 4775fa6cd3b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/psd_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/psd_demo2.pdf b/plot_directive/mpl_examples/pylab_examples/psd_demo2.pdf deleted file mode 100644 index d97e05f28d5..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/psd_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/psd_demo2.py b/plot_directive/mpl_examples/pylab_examples/psd_demo2.py deleted file mode 100644 index c7265524cd0..00000000000 --- a/plot_directive/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 orignal -#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/plot_directive/mpl_examples/pylab_examples/psd_demo3.hires.png b/plot_directive/mpl_examples/pylab_examples/psd_demo3.hires.png deleted file mode 100644 index e3e5c5d4d72..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/psd_demo3.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/psd_demo3.pdf b/plot_directive/mpl_examples/pylab_examples/psd_demo3.pdf deleted file mode 100644 index 462db67f275..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/psd_demo3.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/psd_demo3.py b/plot_directive/mpl_examples/pylab_examples/psd_demo3.py deleted file mode 100644 index ca9abb4282f..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/psd_demo_complex.hires.png b/plot_directive/mpl_examples/pylab_examples/psd_demo_complex.hires.png deleted file mode 100644 index cafb5cc351e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/psd_demo_complex.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/psd_demo_complex.pdf b/plot_directive/mpl_examples/pylab_examples/psd_demo_complex.pdf deleted file mode 100644 index d9e8b714979..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/psd_demo_complex.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/psd_demo_complex.py b/plot_directive/mpl_examples/pylab_examples/psd_demo_complex.py deleted file mode 100644 index 73b204e88c2..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/pythonic_matplotlib.hires.png b/plot_directive/mpl_examples/pylab_examples/pythonic_matplotlib.hires.png deleted file mode 100644 index a590d500156..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/pythonic_matplotlib.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/pythonic_matplotlib.pdf b/plot_directive/mpl_examples/pylab_examples/pythonic_matplotlib.pdf deleted file mode 100644 index 6c3308a447e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/pythonic_matplotlib.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/pythonic_matplotlib.py b/plot_directive/mpl_examples/pylab_examples/pythonic_matplotlib.py deleted file mode 100644 index c8b54664eca..00000000000 --- a/plot_directive/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 show -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/plot_directive/mpl_examples/pylab_examples/quadmesh_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/quadmesh_demo.hires.png deleted file mode 100644 index 1b4cdcd1e30..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/quadmesh_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/quadmesh_demo.pdf b/plot_directive/mpl_examples/pylab_examples/quadmesh_demo.pdf deleted file mode 100644 index 0663466bd6b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/quadmesh_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/quadmesh_demo.py b/plot_directive/mpl_examples/pylab_examples/quadmesh_demo.py deleted file mode 100644 index 6b8e63d2bec..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/quiver_demo.py b/plot_directive/mpl_examples/pylab_examples/quiver_demo.py deleted file mode 100644 index f8c28d96c5f..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/quiver_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/quiver_demo_00.hires.png deleted file mode 100644 index 41e546794a4..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/quiver_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/quiver_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/quiver_demo_00.pdf deleted file mode 100644 index 8842da312a0..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/quiver_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/quiver_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/quiver_demo_01.hires.png deleted file mode 100644 index d915f677ca9..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/quiver_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/quiver_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/quiver_demo_01.pdf deleted file mode 100644 index 94e32b89bee..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/quiver_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/quiver_demo_02.hires.png b/plot_directive/mpl_examples/pylab_examples/quiver_demo_02.hires.png deleted file mode 100644 index ee68dcf20a3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/quiver_demo_02.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/quiver_demo_02.pdf b/plot_directive/mpl_examples/pylab_examples/quiver_demo_02.pdf deleted file mode 100644 index 59df3bbd42a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/quiver_demo_02.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/quiver_demo_03.hires.png b/plot_directive/mpl_examples/pylab_examples/quiver_demo_03.hires.png deleted file mode 100644 index 9ae836f7d7d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/quiver_demo_03.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/quiver_demo_03.pdf b/plot_directive/mpl_examples/pylab_examples/quiver_demo_03.pdf deleted file mode 100644 index 3982a7ea32a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/quiver_demo_03.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/quiver_demo_04.hires.png b/plot_directive/mpl_examples/pylab_examples/quiver_demo_04.hires.png deleted file mode 100644 index 106bc45b58b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/quiver_demo_04.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/quiver_demo_04.pdf b/plot_directive/mpl_examples/pylab_examples/quiver_demo_04.pdf deleted file mode 100644 index f40ea4e2d19..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/quiver_demo_04.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/quiver_demo_05.hires.png b/plot_directive/mpl_examples/pylab_examples/quiver_demo_05.hires.png deleted file mode 100644 index ded4ab446b9..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/quiver_demo_05.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/quiver_demo_05.pdf b/plot_directive/mpl_examples/pylab_examples/quiver_demo_05.pdf deleted file mode 100644 index 2d4374d6e66..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/quiver_demo_05.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/scatter_custom_symbol.hires.png b/plot_directive/mpl_examples/pylab_examples/scatter_custom_symbol.hires.png deleted file mode 100644 index 9bac350b484..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/scatter_custom_symbol.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/scatter_custom_symbol.pdf b/plot_directive/mpl_examples/pylab_examples/scatter_custom_symbol.pdf deleted file mode 100644 index 768f86a47fd..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/scatter_custom_symbol.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/scatter_custom_symbol.py b/plot_directive/mpl_examples/pylab_examples/scatter_custom_symbol.py deleted file mode 100644 index 8a845e276b7..00000000000 --- a/plot_directive/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 = 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/plot_directive/mpl_examples/pylab_examples/scatter_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/scatter_demo.hires.png deleted file mode 100644 index 3b394e57eab..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/scatter_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/scatter_demo.pdf b/plot_directive/mpl_examples/pylab_examples/scatter_demo.pdf deleted file mode 100644 index 09e9b357443..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/scatter_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/scatter_demo.py b/plot_directive/mpl_examples/pylab_examples/scatter_demo.py deleted file mode 100644 index 3adf52b1dd1..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/scatter_demo2.hires.png b/plot_directive/mpl_examples/pylab_examples/scatter_demo2.hires.png deleted file mode 100644 index 6800b3ad92c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/scatter_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/scatter_demo2.pdf b/plot_directive/mpl_examples/pylab_examples/scatter_demo2.pdf deleted file mode 100644 index 12f05fc1343..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/scatter_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/scatter_demo2.py b/plot_directive/mpl_examples/pylab_examples/scatter_demo2.py deleted file mode 100644 index 6c06adf2798..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/scatter_demo2.py +++ /dev/null @@ -1,40 +0,0 @@ -""" -make a scatter plot with varying color and size arguments -""" -import matplotlib -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.mlab as mlab -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') -r = np.load(datafile).view(np.recarray) -r = r[-250:] # get the most recent 250 trading days - -delta1 = np.diff(r.adj_close)/r.adj_close[:-1] - -# size in points ^2 -volume = (15*r.volume[:-2]/r.volume[0])**2 -close = 0.003*r.close[:-2]/0.003*r.open[:-2] - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.scatter(delta1[:-1], delta1[1:], c=close, s=volume, alpha=0.75) - -#ticks = arange(-0.06, 0.061, 0.02) -#xticks(ticks) -#yticks(ticks) - -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) - -plt.show() - - - diff --git a/plot_directive/mpl_examples/pylab_examples/scatter_hist.hires.png b/plot_directive/mpl_examples/pylab_examples/scatter_hist.hires.png deleted file mode 100644 index d803c0d5061..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/scatter_hist.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/scatter_hist.pdf b/plot_directive/mpl_examples/pylab_examples/scatter_hist.pdf deleted file mode 100644 index cc53ac1120c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/scatter_hist.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/scatter_hist.py b/plot_directive/mpl_examples/pylab_examples/scatter_hist.py deleted file mode 100644 index 39636738c16..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/scatter_masked.hires.png b/plot_directive/mpl_examples/pylab_examples/scatter_masked.hires.png deleted file mode 100644 index f4bb5916be8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/scatter_masked.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/scatter_masked.pdf b/plot_directive/mpl_examples/pylab_examples/scatter_masked.pdf deleted file mode 100644 index d6b72588847..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/scatter_masked.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/scatter_masked.py b/plot_directive/mpl_examples/pylab_examples/scatter_masked.py deleted file mode 100644 index c3e3123df74..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/scatter_star_poly.hires.png b/plot_directive/mpl_examples/pylab_examples/scatter_star_poly.hires.png deleted file mode 100644 index bc30e89064d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/scatter_star_poly.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/scatter_star_poly.pdf b/plot_directive/mpl_examples/pylab_examples/scatter_star_poly.pdf deleted file mode 100644 index a21dc4080d0..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/scatter_star_poly.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/scatter_star_poly.py b/plot_directive/mpl_examples/pylab_examples/scatter_star_poly.py deleted file mode 100644 index ccad6e167b9..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/scatter_star_poly.py +++ /dev/null @@ -1,27 +0,0 @@ -import pylab - -x = pylab.rand(10) -y = pylab.rand(10) - -pylab.subplot(321) -pylab.scatter(x,y,s=80,marker=">") - -pylab.subplot(322) -pylab.scatter(x,y,s=80,marker=(5,0)) - -verts = zip([-1.,1.,1.,-1.],[-1.,-1.,1.,-1.]) -pylab.subplot(323) -pylab.scatter(x,y,s=80,marker=(verts,0)) -# equivalent: -#pylab.scatter(x,y,s=80,marker=None, verts=verts) - -pylab.subplot(324) -pylab.scatter(x,y,s=80,marker=(5,1)) - -pylab.subplot(325) -pylab.scatter(x,y,s=80,marker='+') - -pylab.subplot(326) -pylab.scatter(x,y,s=80,marker=(5,2), edgecolor='g') - -pylab.show() diff --git a/plot_directive/mpl_examples/pylab_examples/set_and_get.hires.png b/plot_directive/mpl_examples/pylab_examples/set_and_get.hires.png deleted file mode 100644 index 3efb29c8a2e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/set_and_get.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/set_and_get.pdf b/plot_directive/mpl_examples/pylab_examples/set_and_get.pdf deleted file mode 100644 index e89633ba693..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/set_and_get.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/set_and_get.py b/plot_directive/mpl_examples/pylab_examples/set_and_get.py deleted file mode 100644 index ce1deadca8a..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/set_and_get.py +++ /dev/null @@ -1,96 +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 quey mode introspecting the possible values, only the first - instance in the sequnce is used. When actually setting values, all - the instances will be set. Eg, 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 ... - -Alisases: - - 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 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/plot_directive/mpl_examples/pylab_examples/shading_example.hires.png b/plot_directive/mpl_examples/pylab_examples/shading_example.hires.png deleted file mode 100644 index c57558b0ac1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/shading_example.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/shading_example.pdf b/plot_directive/mpl_examples/pylab_examples/shading_example.pdf deleted file mode 100644 index 559d50c4231..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/shading_example.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/shading_example.py b/plot_directive/mpl_examples/pylab_examples/shading_example.py deleted file mode 100644 index a70791f78d7..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/shared_axis_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/shared_axis_demo.hires.png deleted file mode 100644 index 08c912ebeef..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/shared_axis_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/shared_axis_demo.pdf b/plot_directive/mpl_examples/pylab_examples/shared_axis_demo.pdf deleted file mode 100644 index 6d27f677e85..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/shared_axis_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/shared_axis_demo.py b/plot_directive/mpl_examples/pylab_examples/shared_axis_demo.py deleted file mode 100644 index c432552489e..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/show_colormaps.hires.png b/plot_directive/mpl_examples/pylab_examples/show_colormaps.hires.png deleted file mode 100644 index b9e2dbbbd24..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/show_colormaps.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/show_colormaps.pdf b/plot_directive/mpl_examples/pylab_examples/show_colormaps.pdf deleted file mode 100644 index 674b9c69617..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/show_colormaps.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/show_colormaps.py b/plot_directive/mpl_examples/pylab_examples/show_colormaps.py deleted file mode 100644 index 0146a93c07e..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/simple_plot.hires.png b/plot_directive/mpl_examples/pylab_examples/simple_plot.hires.png deleted file mode 100644 index f8029627c30..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/simple_plot.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/simple_plot.pdf b/plot_directive/mpl_examples/pylab_examples/simple_plot.pdf deleted file mode 100644 index d4a3a89c405..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/simple_plot.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/simple_plot.py b/plot_directive/mpl_examples/pylab_examples/simple_plot.py deleted file mode 100644 index 7f532b618cd..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/simple_plot.py +++ /dev/null @@ -1,11 +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) -show() diff --git a/plot_directive/mpl_examples/pylab_examples/specgram_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/specgram_demo.hires.png deleted file mode 100644 index da0f88cb6bb..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/specgram_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/specgram_demo.pdf b/plot_directive/mpl_examples/pylab_examples/specgram_demo.pdf deleted file mode 100644 index 457b8da9b46..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/specgram_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/specgram_demo.py b/plot_directive/mpl_examples/pylab_examples/specgram_demo.py deleted file mode 100644 index 95a4703a316..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/specgram_demo.py +++ /dev/null @@ -1,29 +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) -show() diff --git a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo.py b/plot_directive/mpl_examples/pylab_examples/spine_placement_demo.py deleted file mode 100644 index ffe0632191a..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo.py +++ /dev/null @@ -1,157 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np -from matplotlib.pyplot import show - -fig = plt.figure() -x = np.linspace(0,2*np.pi,100) -y = 2*np.sin(x) -ax = fig.add_subplot(1,2,1) -ax.set_title('dropped spines') -ax.plot(x,y) -for loc, spine in ax.spines.iteritems(): - if loc in ['left','bottom']: - spine.set_position(('outward',10)) # outward by 10 points - elif loc in ['right','top']: - spine.set_color('none') # don't draw spine - else: - raise ValueError('unknown spine location: %s'%loc) - -# turn off ticks where there is no spine -ax.xaxis.set_ticks_position('bottom') -ax.yaxis.set_ticks_position('left') - -ax = fig.add_subplot(1,2,2,sharex=ax) -ax.plot(x,y) -ax.set_title('normal spines') - -# ---------------------------------------------------- - -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.iteritems(): - 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']) - -# ---------------------------------------------------- - -fig = plt.figure() - -x = np.linspace(0,2*np.pi,50) -y = np.sin(x) -y2 = y + 0.1*np.random.normal( size=x.shape ) - -# plot data -ax = fig.add_subplot(1,1,1) -line1,=ax.plot(x,y,'--') -line2,=ax.plot(x,y2,'bo') - -# adjust the spines -adjust_spines(ax,['left','bottom']) - -# set ticks and tick labels -# x -ax.set_xlim((0,2*np.pi)) -ax.set_xticks([0,np.pi,2*np.pi]) -pichr = unichr(0x03C0) -ax.set_xticklabels(['0',pichr,'2 '+pichr]) - -# y -ax.set_yticks([-1,0,1]) - -# disable clipping of data points by axes range -for artist in (line1,line2): - artist.set_clip_on(False) - -# adjust spine to be within ticks -ax.spines['left'].set_bounds( -1, 1 ) - -show() diff --git a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_00.hires.png deleted file mode 100644 index 6c78ae626e1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_00.pdf deleted file mode 100644 index 009600dcba1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_01.hires.png deleted file mode 100644 index 5cfcd18498e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_01.pdf deleted file mode 100644 index 39103193608..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_02.hires.png b/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_02.hires.png deleted file mode 100644 index 78edd4a5b59..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_02.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_02.pdf b/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_02.pdf deleted file mode 100644 index 8addfb0bd50..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_02.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_03.hires.png b/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_03.hires.png deleted file mode 100644 index 1a6e0b43776..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_03.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_03.pdf b/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_03.pdf deleted file mode 100644 index c31498293a2..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/spine_placement_demo_03.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/spy_demos.hires.png b/plot_directive/mpl_examples/pylab_examples/spy_demos.hires.png deleted file mode 100644 index ef3edf346b1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/spy_demos.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/spy_demos.pdf b/plot_directive/mpl_examples/pylab_examples/spy_demos.pdf deleted file mode 100644 index bc512a0261f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/spy_demos.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/spy_demos.py b/plot_directive/mpl_examples/pylab_examples/spy_demos.py deleted file mode 100644 index 72192359911..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/stem_plot.hires.png b/plot_directive/mpl_examples/pylab_examples/stem_plot.hires.png deleted file mode 100644 index 457dc29abf2..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/stem_plot.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/stem_plot.pdf b/plot_directive/mpl_examples/pylab_examples/stem_plot.pdf deleted file mode 100644 index aa556e7b8cf..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/stem_plot.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/stem_plot.py b/plot_directive/mpl_examples/pylab_examples/stem_plot.py deleted file mode 100644 index 11d4e2a59c7..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/step_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/step_demo.hires.png deleted file mode 100644 index 19283f05cf3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/step_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/step_demo.pdf b/plot_directive/mpl_examples/pylab_examples/step_demo.pdf deleted file mode 100644 index 1ab90f555a5..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/step_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/step_demo.py b/plot_directive/mpl_examples/pylab_examples/step_demo.py deleted file mode 100644 index a6cae14abeb..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/stix_fonts_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/stix_fonts_demo.hires.png deleted file mode 100644 index abd507fa23a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/stix_fonts_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/stix_fonts_demo.pdf b/plot_directive/mpl_examples/pylab_examples/stix_fonts_demo.pdf deleted file mode 100644 index 007eb420336..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/stix_fonts_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/stix_fonts_demo.py b/plot_directive/mpl_examples/pylab_examples/stix_fonts_demo.py deleted file mode 100644 index 356cd652777..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/stix_fonts_demo.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python - -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: - stests.append( - ur'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"(? 0: - # scale colour - scale = 1.0 / maxc - rgb = rgb * scale - # now decrease saturation - total = sum(rgb) - 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 = 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 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]] - - - -axes([0.2, 0.2, 0.7, 0.6]) # leave room below the axes for the table - -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]] - -colLabels = ('Freeze', 'Wind', 'Flood', 'Quake', 'Hail') -rowLabels = ['%d year' % x for x in (100, 50, 20, 10, 5)] - -# Get some pastel shades for the colours -colours = get_colours(len(colLabels)) -colours.reverse() -rows = len(data) - -ind = arange(len(colLabels)) + 0.3 # the x locations for the groups -cellText = [] -width = 0.4 # the width of the bars -yoff = array([0.0] * len(colLabels)) # the bottom values for stacked bar chart -for row in xrange(rows): - bar(ind, data[row], width, bottom=yoff, color=colours[row]) - yoff = yoff + data[row] - cellText.append(['%1.1f' % (x/1000.0) for x in yoff]) - -# Add a table at the bottom of the axes -colours.reverse() -cellText.reverse() -the_table = table(cellText=cellText, - rowLabels=rowLabels, rowColours=colours, - colLabels=colLabels, - loc='bottom') -ylabel("Loss $1000's") -vals = arange(0, 2500, 500) -yticks(vals*1000, ['%d' % val for val in vals]) -xticks([]) -title('Loss by Disaster') - -show() diff --git a/plot_directive/mpl_examples/pylab_examples/tex_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/tex_demo.hires.png deleted file mode 100644 index cdd62f23633..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/tex_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/tex_demo.pdf b/plot_directive/mpl_examples/pylab_examples/tex_demo.pdf deleted file mode 100644 index ebeae9ab9b5..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/tex_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/tex_demo.py b/plot_directive/mpl_examples/pylab_examples/tex_demo.py deleted file mode 100644 index 64e10386e3b..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/tex_demo.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python -""" -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 - -""" -from matplotlib import rc -from numpy import arange, cos, pi -from matplotlib.pyplot import figure, axes, plot, xlabel, ylabel, title, \ - grid, savefig, show - - -rc('text', usetex=True) -rc('font', family='serif') -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{voltage (mV)}',fontsize=16) -title(r"\TeX\ is Number $\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!", - fontsize=16, color='r') -grid(True) -savefig('tex_demo') -show() diff --git a/plot_directive/mpl_examples/pylab_examples/tex_unicode_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/tex_unicode_demo.hires.png deleted file mode 100644 index 8ccb151810e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/tex_unicode_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/tex_unicode_demo.pdf b/plot_directive/mpl_examples/pylab_examples/tex_unicode_demo.pdf deleted file mode 100644 index c4799fe3a29..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/tex_unicode_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/tex_unicode_demo.py b/plot_directive/mpl_examples/pylab_examples/tex_unicode_demo.py deleted file mode 100644 index 09ac25a1335..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/tex_unicode_demo.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -""" -This demo is tex_demo.py modified to have unicode. See that file for -more information. -""" -from matplotlib import rcParams -rcParams['text.usetex']=True -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(ur'\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() diff --git a/plot_directive/mpl_examples/pylab_examples/text_handles.hires.png b/plot_directive/mpl_examples/pylab_examples/text_handles.hires.png deleted file mode 100644 index 026d69decf3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/text_handles.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/text_handles.pdf b/plot_directive/mpl_examples/pylab_examples/text_handles.pdf deleted file mode 100644 index ca3f3bfcf12..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/text_handles.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/text_handles.py b/plot_directive/mpl_examples/pylab_examples/text_handles.py deleted file mode 100644 index bd4bb2d0b9c..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/text_handles.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/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() diff --git a/plot_directive/mpl_examples/pylab_examples/text_rotation.hires.png b/plot_directive/mpl_examples/pylab_examples/text_rotation.hires.png deleted file mode 100644 index 67ee5fc3ea1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/text_rotation.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/text_rotation.pdf b/plot_directive/mpl_examples/pylab_examples/text_rotation.pdf deleted file mode 100644 index 9f849e4279b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/text_rotation.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/text_rotation.py b/plot_directive/mpl_examples/pylab_examples/text_rotation.py deleted file mode 100644 index 2a3fa2dc526..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/text_rotation.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python -""" -The way matplotlib does text layout is counter-intuituve 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() diff --git a/plot_directive/mpl_examples/pylab_examples/text_rotation_relative_to_line.hires.png b/plot_directive/mpl_examples/pylab_examples/text_rotation_relative_to_line.hires.png deleted file mode 100644 index 50028e59235..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/text_rotation_relative_to_line.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/text_rotation_relative_to_line.pdf b/plot_directive/mpl_examples/pylab_examples/text_rotation_relative_to_line.pdf deleted file mode 100644 index 7b0a27d8b7a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/text_rotation_relative_to_line.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/text_rotation_relative_to_line.py b/plot_directive/mpl_examples/pylab_examples/text_rotation_relative_to_line.py deleted file mode 100644 index dcbfa54f079..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/text_rotation_relative_to_line.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/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 inbetween 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() diff --git a/plot_directive/mpl_examples/pylab_examples/text_themes.hires.png b/plot_directive/mpl_examples/pylab_examples/text_themes.hires.png deleted file mode 100644 index 300440a11f1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/text_themes.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/text_themes.pdf b/plot_directive/mpl_examples/pylab_examples/text_themes.pdf deleted file mode 100644 index 6ceb573a00a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/text_themes.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/text_themes.py b/plot_directive/mpl_examples/pylab_examples/text_themes.py deleted file mode 100644 index 43dfc39064f..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/text_themes.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/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() diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_00.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_00.png deleted file mode 100644 index 3d89136322b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_00.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_01.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_01.png deleted file mode 100644 index ea3ed472182..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_01.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_log.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_log.png deleted file mode 100644 index 6965cafd3dd..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_log.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/dannys_example.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/dannys_example.png deleted file mode 100644 index 40dca857450..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/dannys_example.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/dash_control.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/dash_control.png deleted file mode 100644 index 99d8f92a7b7..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/dash_control.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_00.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_00.png deleted file mode 100644 index 1234d7b8b34..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_00.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_01.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_01.png deleted file mode 100644 index a24c4280d4a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_01.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/fancybox_demo.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/fancybox_demo.png deleted file mode 100644 index f9d4e94cf94..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/fancybox_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_demo.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_demo.png deleted file mode 100644 index 9dc07f595dd..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_demo2.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_demo2.png deleted file mode 100644 index 183acb49e8a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_demo2.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_00.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_00.png deleted file mode 100644 index 265eba470aa..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_00.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_01.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_01.png deleted file mode 100644 index 8984df7cf1b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_01.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_02.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_02.png deleted file mode 100644 index 99b557fcb40..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_02.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_03.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_03.png deleted file mode 100644 index 3b3c32d0e23..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_03.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_04.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_04.png deleted file mode 100644 index c62598b2f7c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_04.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_05.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_05.png deleted file mode 100644 index 8076fff8fea..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_05.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_06.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_06.png deleted file mode 100644 index 7af14c91d0e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_06.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_07.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_07.png deleted file mode 100644 index a17326d79ff..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_07.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_08.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_08.png deleted file mode 100644 index e8af5ef9af5..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_08.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_09.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_09.png deleted file mode 100644 index 8f1cdb97e7c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_09.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_10.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_10.png deleted file mode 100644 index c65830264eb..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_10.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_11.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_11.png deleted file mode 100644 index f75be22da38..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_11.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_12.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_12.png deleted file mode 100644 index 6cc32ab82f2..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_12.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/griddata_demo_00_00.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/griddata_demo_00_00.png deleted file mode 100644 index 3d03cd05f7e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/griddata_demo_00_00.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo.png deleted file mode 100644 index 82fae02cd02..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_00.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_00.png deleted file mode 100644 index 873b96e79a0..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_00.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_01.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_01.png deleted file mode 100644 index a9aa5efcd5c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_01.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_02.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_02.png deleted file mode 100644 index 6260aede9c1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_02.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_03.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_03.png deleted file mode 100644 index 3bd63ef8402..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_03.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_04.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_04.png deleted file mode 100644 index 3a28070b691..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_04.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_05.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_05.png deleted file mode 100644 index 8a06ae2a239..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_05.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_06.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_06.png deleted file mode 100644 index 5e57d6976af..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_06.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/hline_demo.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/hline_demo.png deleted file mode 100644 index fb525029df9..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/hline_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo3.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo3.png deleted file mode 100644 index 93b0623ced8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo3.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/integral_demo.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/integral_demo.png deleted file mode 100644 index bb3d84282b1..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/integral_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_00.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_00.png deleted file mode 100644 index b9853d5026b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_00.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_01.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_01.png deleted file mode 100644 index 4c448b0385b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_01.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_02.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_02.png deleted file mode 100644 index 62a8ada292b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_02.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_03.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_03.png deleted file mode 100644 index 3f0675af629..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_03.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_04.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_04.png deleted file mode 100644 index 780d6c7538c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_04.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_05.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_05.png deleted file mode 100644 index 64d63802224..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_05.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_06.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_06.png deleted file mode 100644 index ce50c0e359a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_06.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_07.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_07.png deleted file mode 100644 index a486900b571..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_07.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_08.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_08.png deleted file mode 100644 index 921bc1ff7f8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_08.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_09.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_09.png deleted file mode 100644 index 854aaab904e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_09.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo.png deleted file mode 100644 index eca6d045d29..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo_custom_handler.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo_custom_handler.png deleted file mode 100644 index d2dfcff78b2..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo_custom_handler.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_scatter.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_scatter.png deleted file mode 100644 index c0075990534..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_scatter.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_translucent.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_translucent.png deleted file mode 100644 index 3b3a05adbcc..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_translucent.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/line_styles.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/line_styles.png deleted file mode 100644 index 66d8461589a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/line_styles.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_04.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_04.png deleted file mode 100644 index a7c0ac38a27..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_04.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/pcolor_demo2.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/pcolor_demo2.png deleted file mode 100644 index 243d6fad27e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/pcolor_demo2.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/pie_demo.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/pie_demo.png deleted file mode 100644 index 21133dc4fe0..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/pie_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_bar.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_bar.png deleted file mode 100644 index f8b1874846b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_bar.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_scatter.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_scatter.png deleted file mode 100644 index c51fd278d9c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_scatter.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/poormans_contour.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/poormans_contour.png deleted file mode 100644 index 611b04da9cb..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/poormans_contour.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/psd_demo.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/psd_demo.png deleted file mode 100644 index 436aca9cfbf..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/psd_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_demo.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_demo.png deleted file mode 100644 index e6efbfe42cb..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/shading_example.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/shading_example.png deleted file mode 100644 index 09bcdedddca..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/shading_example.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/show_colormaps.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/show_colormaps.png deleted file mode 100644 index ca62444e4f0..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/show_colormaps.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_02.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_02.png deleted file mode 100644 index cb9a726b44c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_02.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_03.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_03.png deleted file mode 100644 index d2bfd7fa1f8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_03.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/stix_fonts_demo.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/stix_fonts_demo.png deleted file mode 100644 index b370830bcd6..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/stix_fonts_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_demo_00.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_demo_00.png deleted file mode 100644 index c79ad9eba27..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_demo_00.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_demo_01.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_demo_01.png deleted file mode 100644 index 07db1923e19..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_demo_01.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_with_mask.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_with_mask.png deleted file mode 100644 index 5e0689eb152..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_with_mask.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/text_themes.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/text_themes.png deleted file mode 100644 index 135f5cbf444..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/text_themes.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/to_numeric.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/to_numeric.png deleted file mode 100644 index 0f2f0b7016c..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/to_numeric.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/unicode_demo.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/unicode_demo.png deleted file mode 100644 index d9e3c14e31a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/unicode_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/vertical_ticklabels.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/vertical_ticklabels.png deleted file mode 100644 index 80592504c75..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/vertical_ticklabels.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/thumbnails/vline_demo.png b/plot_directive/mpl_examples/pylab_examples/thumbnails/vline_demo.png deleted file mode 100644 index a1d3c17a1fc..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/thumbnails/vline_demo.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/to_numeric.hires.png b/plot_directive/mpl_examples/pylab_examples/to_numeric.hires.png deleted file mode 100644 index 4c5cde32b62..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/to_numeric.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/to_numeric.pdf b/plot_directive/mpl_examples/pylab_examples/to_numeric.pdf deleted file mode 100644 index fbb05149557..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/to_numeric.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/to_numeric.py b/plot_directive/mpl_examples/pylab_examples/to_numeric.py deleted file mode 100644 index c58a2d4d611..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/to_numeric.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/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 -""" - -from pylab import * -from matplotlib.backends.backend_agg import FigureCanvasAgg -try: - from PIL import Image -except ImportError, exc: - raise SystemExit("PIL must be installed to run this example") - -plot([1,2,3]) - -canvas = 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 = fromstring(s, uint8) -X.shape = h, w, 3 - -im = Image.fromstring( "RGB", (w,h), s) -# im.show() - diff --git a/plot_directive/mpl_examples/pylab_examples/toggle_images.hires.png b/plot_directive/mpl_examples/pylab_examples/toggle_images.hires.png deleted file mode 100644 index 5bb535766b9..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/toggle_images.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/toggle_images.pdf b/plot_directive/mpl_examples/pylab_examples/toggle_images.pdf deleted file mode 100644 index 0dd04c3a97a..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/toggle_images.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/toggle_images.py b/plot_directive/mpl_examples/pylab_examples/toggle_images.py deleted file mode 100644 index 327a91391d6..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/toggle_images.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/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 sifferent 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() diff --git a/plot_directive/mpl_examples/pylab_examples/transoffset.hires.png b/plot_directive/mpl_examples/pylab_examples/transoffset.hires.png deleted file mode 100644 index 01503dc3238..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/transoffset.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/transoffset.pdf b/plot_directive/mpl_examples/pylab_examples/transoffset.pdf deleted file mode 100644 index 585166be0dd..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/transoffset.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/transoffset.py b/plot_directive/mpl_examples/pylab_examples/transoffset.py deleted file mode 100644 index 42b4db17a59..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/transoffset.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/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() - diff --git a/plot_directive/mpl_examples/pylab_examples/tricontour_demo.py b/plot_directive/mpl_examples/pylab_examples/tricontour_demo.py deleted file mode 100644 index fbf1b5537a1..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/tricontour_demo.py +++ /dev/null @@ -1,98 +0,0 @@ -""" -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() diff --git a/plot_directive/mpl_examples/pylab_examples/tricontour_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/tricontour_demo_00.hires.png deleted file mode 100644 index d85dddeb954..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/tricontour_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/tricontour_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/tricontour_demo_00.pdf deleted file mode 100644 index fe1f7b2a6e9..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/tricontour_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/tricontour_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/tricontour_demo_01.hires.png deleted file mode 100644 index 39d60dbf3e8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/tricontour_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/tricontour_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/tricontour_demo_01.pdf deleted file mode 100644 index db090ff33f6..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/tricontour_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/tricontour_vs_griddata.hires.png b/plot_directive/mpl_examples/pylab_examples/tricontour_vs_griddata.hires.png deleted file mode 100644 index 66f40b7dbd8..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/tricontour_vs_griddata.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/tricontour_vs_griddata.pdf b/plot_directive/mpl_examples/pylab_examples/tricontour_vs_griddata.pdf deleted file mode 100644 index 504886b3893..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/tricontour_vs_griddata.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/tricontour_vs_griddata.py b/plot_directive/mpl_examples/pylab_examples/tricontour_vs_griddata.py deleted file mode 100644 index fa1f5966c26..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/tricontour_vs_griddata.py +++ /dev/null @@ -1,47 +0,0 @@ -""" -Comparison of griddata and tricontour for an unstructured triangular grid. -""" -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.jet) -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:', 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.jet) -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:', time.clock() - start - -plt.show() diff --git a/plot_directive/mpl_examples/pylab_examples/tripcolor_demo.py b/plot_directive/mpl_examples/pylab_examples/tripcolor_demo.py deleted file mode 100644 index cf0bbfa0ddb..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/tripcolor_demo.py +++ /dev/null @@ -1,98 +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) - -# pcolor plot. -plt.figure() -plt.gca().set_aspect('equal') -plt.tripcolor(triang, z, shading='faceted') -plt.colorbar() -plt.title('tripcolor 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.tripcolor(x, y, triangles, z, shading='faceted') -plt.colorbar() -plt.title('tripcolor of user-specified triangulation') -plt.xlabel('Longitude (degrees)') -plt.ylabel('Latitude (degrees)') - -plt.show() diff --git a/plot_directive/mpl_examples/pylab_examples/tripcolor_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/tripcolor_demo_00.hires.png deleted file mode 100644 index 9b4a7be6a1f..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/tripcolor_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/tripcolor_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/tripcolor_demo_00.pdf deleted file mode 100644 index e55ba0e7093..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/tripcolor_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/tripcolor_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/tripcolor_demo_01.hires.png deleted file mode 100644 index f9c1edbadff..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/tripcolor_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/tripcolor_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/tripcolor_demo_01.pdf deleted file mode 100644 index 802cce729b7..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/tripcolor_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/triplot_demo.py b/plot_directive/mpl_examples/pylab_examples/triplot_demo.py deleted file mode 100644 index 0b68959b884..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/triplot_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/triplot_demo_00.hires.png deleted file mode 100644 index 74a5e11f943..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/triplot_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/triplot_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/triplot_demo_00.pdf deleted file mode 100644 index 7131f581556..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/triplot_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/triplot_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/triplot_demo_01.hires.png deleted file mode 100644 index 403a783862b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/triplot_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/triplot_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/triplot_demo_01.pdf deleted file mode 100644 index 0e528f717d2..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/triplot_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/unicode_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/unicode_demo.hires.png deleted file mode 100644 index ac7c895949b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/unicode_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/unicode_demo.pdf b/plot_directive/mpl_examples/pylab_examples/unicode_demo.pdf deleted file mode 100644 index a7c5ef81238..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/unicode_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/unicode_demo.py b/plot_directive/mpl_examples/pylab_examples/unicode_demo.py deleted file mode 100644 index e052c2ae19a..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/unicode_demo.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -from pylab import * -plot([1,2,4]) -title(u'Développés et fabriqués') -xlabel(u"réactivité nous permettent d'être sélectionnés et adoptés") -ylabel(u'André was here!') -text( 0.5, 2.5, u'Institut für Festkörperphysik', rotation=45) -text( 1, 1.5, u'AVA (check kerning)') - -show() diff --git a/plot_directive/mpl_examples/pylab_examples/usetex_baseline_test.hires.png b/plot_directive/mpl_examples/pylab_examples/usetex_baseline_test.hires.png deleted file mode 100644 index 8e7be094e4e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/usetex_baseline_test.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/usetex_baseline_test.pdf b/plot_directive/mpl_examples/pylab_examples/usetex_baseline_test.pdf deleted file mode 100644 index a5dce23e224..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/usetex_baseline_test.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/usetex_baseline_test.py b/plot_directive/mpl_examples/pylab_examples/usetex_baseline_test.py deleted file mode 100644 index 21f19cfddd6..00000000000 --- a/plot_directive/mpl_examples/pylab_examples/usetex_baseline_test.py +++ /dev/null @@ -1,76 +0,0 @@ - -import matplotlib -import matplotlib.pyplot as plt -import matplotlib.axes as maxes - -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/plot_directive/mpl_examples/pylab_examples/usetex_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/usetex_demo.hires.png deleted file mode 100644 index fdd55affb0d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/usetex_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/usetex_demo.pdf b/plot_directive/mpl_examples/pylab_examples/usetex_demo.pdf deleted file mode 100644 index dca95100a94..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/usetex_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/usetex_demo.py b/plot_directive/mpl_examples/pylab_examples/usetex_demo.py deleted file mode 100644 index 049f1b7ec95..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/usetex_fonteffects.hires.png b/plot_directive/mpl_examples/pylab_examples/usetex_fonteffects.hires.png deleted file mode 100644 index df1979096c3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/usetex_fonteffects.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/usetex_fonteffects.pdf b/plot_directive/mpl_examples/pylab_examples/usetex_fonteffects.pdf deleted file mode 100644 index e24d6af053d..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/usetex_fonteffects.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/usetex_fonteffects.py b/plot_directive/mpl_examples/pylab_examples/usetex_fonteffects.py deleted file mode 100644 index aeffe7875b9..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/vertical_ticklabels.hires.png b/plot_directive/mpl_examples/pylab_examples/vertical_ticklabels.hires.png deleted file mode 100644 index e7f7a8e0428..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/vertical_ticklabels.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/vertical_ticklabels.pdf b/plot_directive/mpl_examples/pylab_examples/vertical_ticklabels.pdf deleted file mode 100644 index fa13640c7bd..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/vertical_ticklabels.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/vertical_ticklabels.py b/plot_directive/mpl_examples/pylab_examples/vertical_ticklabels.py deleted file mode 100644 index 2416a785bfc..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/vline_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/vline_demo.hires.png deleted file mode 100644 index 92fb9ad6c0b..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/vline_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/vline_demo.pdf b/plot_directive/mpl_examples/pylab_examples/vline_demo.pdf deleted file mode 100644 index 5e4716951a4..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/vline_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/vline_demo.py b/plot_directive/mpl_examples/pylab_examples/vline_demo.py deleted file mode 100644 index 98b512f50ae..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/xcorr_demo.hires.png b/plot_directive/mpl_examples/pylab_examples/xcorr_demo.hires.png deleted file mode 100644 index 90a8bc194da..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/xcorr_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/xcorr_demo.pdf b/plot_directive/mpl_examples/pylab_examples/xcorr_demo.pdf deleted file mode 100644 index 532dde634dd..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/xcorr_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/xcorr_demo.py b/plot_directive/mpl_examples/pylab_examples/xcorr_demo.py deleted file mode 100644 index d21357137b5..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/zorder_demo.py b/plot_directive/mpl_examples/pylab_examples/zorder_demo.py deleted file mode 100644 index 2fdbdd6f5d1..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/pylab_examples/zorder_demo_00.hires.png b/plot_directive/mpl_examples/pylab_examples/zorder_demo_00.hires.png deleted file mode 100644 index 007c6b19a95..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/zorder_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/zorder_demo_00.pdf b/plot_directive/mpl_examples/pylab_examples/zorder_demo_00.pdf deleted file mode 100644 index 1e9ac785ff6..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/zorder_demo_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/zorder_demo_01.hires.png b/plot_directive/mpl_examples/pylab_examples/zorder_demo_01.hires.png deleted file mode 100644 index df29fb5d0c3..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/zorder_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/pylab_examples/zorder_demo_01.pdf b/plot_directive/mpl_examples/pylab_examples/zorder_demo_01.pdf deleted file mode 100644 index 5b2ece9656e..00000000000 Binary files a/plot_directive/mpl_examples/pylab_examples/zorder_demo_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/units/annotate_with_units.hires.png b/plot_directive/mpl_examples/units/annotate_with_units.hires.png deleted file mode 100644 index 4856104ebc6..00000000000 Binary files a/plot_directive/mpl_examples/units/annotate_with_units.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/units/annotate_with_units.pdf b/plot_directive/mpl_examples/units/annotate_with_units.pdf deleted file mode 100644 index 383cd61f347..00000000000 Binary files a/plot_directive/mpl_examples/units/annotate_with_units.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/units/annotate_with_units.py b/plot_directive/mpl_examples/units/annotate_with_units.py deleted file mode 100644 index deb06f37829..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/units/artist_tests.py b/plot_directive/mpl_examples/units/artist_tests.py deleted file mode 100644 index cc5d757e8e3..00000000000 --- a/plot_directive/mpl_examples/units/artist_tests.py +++ /dev/null @@ -1,48 +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 pylab import figure, show - -fig = figure() -ax = fig.add_subplot(111) -ax.xaxis.set_units(cm) -ax.yaxis.set_units(cm) - -# test a line collection -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) - -# test a patch -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) -show() diff --git a/plot_directive/mpl_examples/units/bar_demo2.hires.png b/plot_directive/mpl_examples/units/bar_demo2.hires.png deleted file mode 100644 index 62d2a47dffe..00000000000 Binary files a/plot_directive/mpl_examples/units/bar_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/units/bar_demo2.pdf b/plot_directive/mpl_examples/units/bar_demo2.pdf deleted file mode 100644 index 94787f2c178..00000000000 Binary files a/plot_directive/mpl_examples/units/bar_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/units/bar_demo2.py b/plot_directive/mpl_examples/units/bar_demo2.py deleted file mode 100644 index 7c00757d8df..00000000000 --- a/plot_directive/mpl_examples/units/bar_demo2.py +++ /dev/null @@ -1,35 +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 -from pylab import figure, show - -cms = cm *np.arange(0, 10, 2) -bottom=0*cm -width=0.8*cm - -fig = 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 - -show() diff --git a/plot_directive/mpl_examples/units/bar_unit_demo.hires.png b/plot_directive/mpl_examples/units/bar_unit_demo.hires.png deleted file mode 100644 index b157f7ec093..00000000000 Binary files a/plot_directive/mpl_examples/units/bar_unit_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/units/bar_unit_demo.pdf b/plot_directive/mpl_examples/units/bar_unit_demo.pdf deleted file mode 100644 index 710c4fa60f7..00000000000 Binary files a/plot_directive/mpl_examples/units/bar_unit_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/units/bar_unit_demo.py b/plot_directive/mpl_examples/units/bar_unit_demo.py deleted file mode 100644 index 828d008c8de..00000000000 --- a/plot_directive/mpl_examples/units/bar_unit_demo.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python -import numpy as np -from basic_units import cm, inch -from pylab import figure, show - -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 = 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() - -#savefig('barchart_demo') -show() diff --git a/plot_directive/mpl_examples/units/basic_units.py b/plot_directive/mpl_examples/units/basic_units.py deleted file mode 100644 index 08d0b859427..00000000000 --- a/plot_directive/mpl_examples/units/basic_units.py +++ /dev/null @@ -1,362 +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): - #print 'passthrough', self.target, self.fn_name - 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): - - __metaclass__ = TaggedValueMeta - _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 get_compressed_copy(self, mask): - compressed_value = np.ma.masked_array(self.value, mask=mask).compressed() - return TaggedValue(compressed_value, self.unit) - - 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 __iter__(self): - class IteratorProxy(object): - def __init__(self, iter, unit): - self.iter = iter - self.unit = unit - def next(self): - value = self.iter.next() - return TaggedValue(value, self.unit) - 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): - #print 'convert to', unit, 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 - - -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): - #print 'convert value to: value ="%s", unit="%s"'%(value, type(unit)), self.conversions - 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 - #print 'convert checking iterable' - 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) ): - result = [] - for val in x: - result.append( math.cos( val.convert_to( radians ).get_value() ) ) - return result - else: - return math.cos( x.convert_to( radians ).get_value() ) - -basicConverter = BasicUnitConverter() -units.registry[BasicUnit] = basicConverter -units.registry[TaggedValue] = basicConverter - diff --git a/plot_directive/mpl_examples/units/ellipse_with_units.py b/plot_directive/mpl_examples/units/ellipse_with_units.py deleted file mode 100644 index aae24c6927a..00000000000 --- a/plot_directive/mpl_examples/units/ellipse_with_units.py +++ /dev/null @@ -1,69 +0,0 @@ -""" -Compare the ellipse generated with arcs versus a polygonal approximation -""" -from basic_units import cm -import numpy as npy -from matplotlib import patches -from pylab import figure, show - -xcenter, ycenter = 0.38*cm, 0.52*cm -#xcenter, ycenter = 0., 0. -width, height = 1e-1*cm, 3e-1*cm -angle = -30 - -theta = npy.arange(0.0, 360.0, 1.0)*npy.pi/180.0 -x = 0.5 * width * npy.cos(theta) -y = 0.5 * height * npy.sin(theta) - -rtheta = angle*npy.pi/180. -R = npy.array([ - [npy.cos(rtheta), -npy.sin(rtheta)], - [npy.sin(rtheta), npy.cos(rtheta)], - ]) - - -x, y = npy.dot(R, npy.array([x, y])) -x += xcenter -y += ycenter - -fig = 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 = 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') - -show() diff --git a/plot_directive/mpl_examples/units/ellipse_with_units_00.hires.png b/plot_directive/mpl_examples/units/ellipse_with_units_00.hires.png deleted file mode 100644 index 6f75cbfa000..00000000000 Binary files a/plot_directive/mpl_examples/units/ellipse_with_units_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/units/ellipse_with_units_00.pdf b/plot_directive/mpl_examples/units/ellipse_with_units_00.pdf deleted file mode 100644 index 49ebf8ac06d..00000000000 Binary files a/plot_directive/mpl_examples/units/ellipse_with_units_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/units/ellipse_with_units_01.hires.png b/plot_directive/mpl_examples/units/ellipse_with_units_01.hires.png deleted file mode 100644 index 49e54519b5f..00000000000 Binary files a/plot_directive/mpl_examples/units/ellipse_with_units_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/units/ellipse_with_units_01.pdf b/plot_directive/mpl_examples/units/ellipse_with_units_01.pdf deleted file mode 100644 index 69e1a016a22..00000000000 Binary files a/plot_directive/mpl_examples/units/ellipse_with_units_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/units/evans_test.py b/plot_directive/mpl_examples/units/evans_test.py deleted file mode 100644 index c26918faee1..00000000000 --- a/plot_directive/mpl_examples/units/evans_test.py +++ /dev/null @@ -1,95 +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 -""" - -import matplotlib -matplotlib.rcParams['units'] = True - -from matplotlib.cbook import iterable -import matplotlib.units as units -import matplotlib.ticker as ticker -from pylab import figure, show - -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( 4, 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 = figure() -fig.subplots_adjust(bottom=0.2) -ax = fig.add_subplot(111) -ax.plot( x, y, 'o', xunits=2.0 ) -for label in ax.get_xticklabels(): - label.set_rotation(30) - label.set_ha('right') - -#fig.savefig('plot1.png') - -# plot without specifying units; will use the None branch for axisinfo -fig2 = figure() -ax = fig2.add_subplot(111) -ax.plot( x, y ) # uses default units -#p.savefig('plot2.png') - -fig3 = figure() -ax = fig3.add_subplot(111) -ax.plot( x, y, xunits=0.5) - -show() diff --git a/plot_directive/mpl_examples/units/evans_test_00.hires.png b/plot_directive/mpl_examples/units/evans_test_00.hires.png deleted file mode 100644 index a4a37f8fe46..00000000000 Binary files a/plot_directive/mpl_examples/units/evans_test_00.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/units/evans_test_00.pdf b/plot_directive/mpl_examples/units/evans_test_00.pdf deleted file mode 100644 index 01dd9502e11..00000000000 Binary files a/plot_directive/mpl_examples/units/evans_test_00.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/units/evans_test_01.hires.png b/plot_directive/mpl_examples/units/evans_test_01.hires.png deleted file mode 100644 index 60af04c880d..00000000000 Binary files a/plot_directive/mpl_examples/units/evans_test_01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/units/evans_test_01.pdf b/plot_directive/mpl_examples/units/evans_test_01.pdf deleted file mode 100644 index 1a6b131b886..00000000000 Binary files a/plot_directive/mpl_examples/units/evans_test_01.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/units/evans_test_02.hires.png b/plot_directive/mpl_examples/units/evans_test_02.hires.png deleted file mode 100644 index aea411acaaf..00000000000 Binary files a/plot_directive/mpl_examples/units/evans_test_02.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/units/evans_test_02.pdf b/plot_directive/mpl_examples/units/evans_test_02.pdf deleted file mode 100644 index 6c142e3ccd5..00000000000 Binary files a/plot_directive/mpl_examples/units/evans_test_02.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/units/radian_demo.hires.png b/plot_directive/mpl_examples/units/radian_demo.hires.png deleted file mode 100644 index 845122d0b48..00000000000 Binary files a/plot_directive/mpl_examples/units/radian_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/units/radian_demo.pdf b/plot_directive/mpl_examples/units/radian_demo.pdf deleted file mode 100644 index 88da429d25f..00000000000 Binary files a/plot_directive/mpl_examples/units/radian_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/units/radian_demo.py b/plot_directive/mpl_examples/units/radian_demo.py deleted file mode 100644 index 3eeca931e75..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/units/units_sample.hires.png b/plot_directive/mpl_examples/units/units_sample.hires.png deleted file mode 100644 index 1044170effa..00000000000 Binary files a/plot_directive/mpl_examples/units/units_sample.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/units/units_sample.pdf b/plot_directive/mpl_examples/units/units_sample.pdf deleted file mode 100644 index 574e64098cf..00000000000 Binary files a/plot_directive/mpl_examples/units/units_sample.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/units/units_sample.py b/plot_directive/mpl_examples/units/units_sample.py deleted file mode 100644 index bf54a047661..00000000000 --- a/plot_directive/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 -from pylab import figure, show -import numpy - -cms = cm *numpy.arange(0, 10, 2) - -fig = 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 - -show() diff --git a/plot_directive/mpl_examples/units/units_scatter.hires.png b/plot_directive/mpl_examples/units/units_scatter.hires.png deleted file mode 100644 index d5d176df6d3..00000000000 Binary files a/plot_directive/mpl_examples/units/units_scatter.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/units/units_scatter.pdf b/plot_directive/mpl_examples/units/units_scatter.pdf deleted file mode 100644 index bbd847c925e..00000000000 Binary files a/plot_directive/mpl_examples/units/units_scatter.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/units/units_scatter.py b/plot_directive/mpl_examples/units/units_scatter.py deleted file mode 100644 index 41d2541e948..00000000000 --- a/plot_directive/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/plot_directive/mpl_examples/widgets/slider_demo.hires.png b/plot_directive/mpl_examples/widgets/slider_demo.hires.png deleted file mode 100644 index 2a37b3a80a1..00000000000 Binary files a/plot_directive/mpl_examples/widgets/slider_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_examples/widgets/slider_demo.pdf b/plot_directive/mpl_examples/widgets/slider_demo.pdf deleted file mode 100644 index 83c9e9648af..00000000000 Binary files a/plot_directive/mpl_examples/widgets/slider_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_examples/widgets/slider_demo.py b/plot_directive/mpl_examples/widgets/slider_demo.py deleted file mode 100644 index fd27b681d0f..00000000000 --- a/plot_directive/mpl_examples/widgets/slider_demo.py +++ /dev/null @@ -1,43 +0,0 @@ -from pylab import * -from matplotlib.widgets import Slider, Button, RadioButtons - -ax = subplot(111) -subplots_adjust(left=0.25, bottom=0.25) -t = arange(0.0, 1.0, 0.001) -a0 = 5 -f0 = 3 -s = a0*sin(2*pi*f0*t) -l, = plot(t,s, lw=2, color='red') -axis([0, 1, -10, 10]) - -axcolor = 'lightgoldenrodyellow' -axfreq = axes([0.25, 0.1, 0.65, 0.03], axisbg=axcolor) -axamp = 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*sin(2*pi*freq*t)) - draw() -sfreq.on_changed(update) -samp.on_changed(update) - -resetax = 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 = 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) - draw() -radio.on_clicked(colorfunc) - -show() - diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/demo_axes_grid.hires.png b/plot_directive/mpl_toolkits/axes_grid/examples/demo_axes_grid.hires.png deleted file mode 100644 index 8325f9793a8..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/demo_axes_grid.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/demo_axes_grid.pdf b/plot_directive/mpl_toolkits/axes_grid/examples/demo_axes_grid.pdf deleted file mode 100644 index 8d8dfc4abd2..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/demo_axes_grid.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/demo_axes_grid.py b/plot_directive/mpl_toolkits/axes_grid/examples/demo_axes_grid.py deleted file mode 100644 index f6232d5ef3c..00000000000 --- a/plot_directive/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 labeld. - """ - 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 colobar - """ - 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 colobar. - """ - - 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/plot_directive/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.hires.png b/plot_directive/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.hires.png deleted file mode 100644 index 5e94578189d..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.pdf b/plot_directive/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.pdf deleted file mode 100644 index f1a71a959ec..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.py b/plot_directive/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.py deleted file mode 100644 index 1a738b50d71..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axes.hires.png b/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axes.hires.png deleted file mode 100644 index f0b30557660..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axes.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axes.pdf b/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axes.pdf deleted file mode 100644 index ab177cdc432..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axes.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axes.py b/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axes.py deleted file mode 100644 index 9eda9e4a2ab..00000000000 --- a/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axes.py +++ /dev/null @@ -1,154 +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) - - grid_helper.grid_finder.grid_locator1._nbins = 4 - grid_helper.grid_finder.grid_locator2._nbins = 4 - - return ax1 - - -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 = setup_axes1(fig, 131) - - #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. # indegree - radius = np.random.rand(10)*14000. - aux_ax3.scatter(theta, radius) - - plt.show() - diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axis.hires.png b/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axis.hires.png deleted file mode 100644 index daa5d0388cf..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axis.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axis.pdf b/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axis.pdf deleted file mode 100644 index ae177b311a6..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axis.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axis.py b/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axis.py deleted file mode 100644 index dc9ed3be94b..00000000000 --- a/plot_directive/mpl_toolkits/axes_grid/examples/demo_floating_axis.py +++ /dev/null @@ -1,71 +0,0 @@ -""" -An experimental support for curvelinear 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/plot_directive/mpl_toolkits/axes_grid/examples/demo_parasite_axes2.hires.png b/plot_directive/mpl_toolkits/axes_grid/examples/demo_parasite_axes2.hires.png deleted file mode 100644 index bce4a734634..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/demo_parasite_axes2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/demo_parasite_axes2.pdf b/plot_directive/mpl_toolkits/axes_grid/examples/demo_parasite_axes2.pdf deleted file mode 100644 index 6e078a57c8e..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/demo_parasite_axes2.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/demo_parasite_axes2.py b/plot_directive/mpl_toolkits/axes_grid/examples/demo_parasite_axes2.py deleted file mode 100644 index 2f73bb084cc..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo.hires.png b/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo.hires.png deleted file mode 100644 index f76bbe56ebe..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo.pdf b/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo.pdf deleted file mode 100644 index 2c920ee58ea..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo.py b/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo.py deleted file mode 100644 index 9dfe0024feb..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo2.hires.png b/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo2.hires.png deleted file mode 100644 index 16f8e628bd8..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo2.pdf b/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo2.pdf deleted file mode 100644 index c43c2987c5b..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo2.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo2.py b/plot_directive/mpl_toolkits/axes_grid/examples/inset_locator_demo2.py deleted file mode 100644 index a4e08be3493..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/examples/parasite_simple2.hires.png b/plot_directive/mpl_toolkits/axes_grid/examples/parasite_simple2.hires.png deleted file mode 100644 index babc0e585bd..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/parasite_simple2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/parasite_simple2.pdf b/plot_directive/mpl_toolkits/axes_grid/examples/parasite_simple2.pdf deleted file mode 100644 index 7eb967032da..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/parasite_simple2.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/parasite_simple2.py b/plot_directive/mpl_toolkits/axes_grid/examples/parasite_simple2.py deleted file mode 100644 index 136ffd2912b..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/examples/scatter_hist.hires.png b/plot_directive/mpl_toolkits/axes_grid/examples/scatter_hist.hires.png deleted file mode 100644 index 1851cf40283..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/scatter_hist.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/scatter_hist.pdf b/plot_directive/mpl_toolkits/axes_grid/examples/scatter_hist.pdf deleted file mode 100644 index 2cc777124bb..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/scatter_hist.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/scatter_hist.py b/plot_directive/mpl_toolkits/axes_grid/examples/scatter_hist.py deleted file mode 100644 index b846704e0e7..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/examples/simple_anchored_artists.hires.png b/plot_directive/mpl_toolkits/axes_grid/examples/simple_anchored_artists.hires.png deleted file mode 100644 index 6c8104f3a39..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/simple_anchored_artists.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/simple_anchored_artists.pdf b/plot_directive/mpl_toolkits/axes_grid/examples/simple_anchored_artists.pdf deleted file mode 100644 index 88f1acbc5af..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/simple_anchored_artists.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/simple_anchored_artists.py b/plot_directive/mpl_toolkits/axes_grid/examples/simple_anchored_artists.py deleted file mode 100644 index 8853534d23b..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid.hires.png b/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid.hires.png deleted file mode 100644 index 486f34bfb19..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid.pdf b/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid.pdf deleted file mode 100644 index 1b9c77197e3..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid.py b/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid.py deleted file mode 100644 index 5038b4eee0b..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid2.hires.png b/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid2.hires.png deleted file mode 100644 index 25796b99581..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid2.pdf b/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid2.pdf deleted file mode 100644 index 41a446e18da..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid2.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid2.py b/plot_directive/mpl_toolkits/axes_grid/examples/simple_axesgrid2.py deleted file mode 100644 index efd7fb45a9b..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/examples/simple_axisline4.hires.png b/plot_directive/mpl_toolkits/axes_grid/examples/simple_axisline4.hires.png deleted file mode 100644 index da89f38e21c..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/simple_axisline4.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/simple_axisline4.pdf b/plot_directive/mpl_toolkits/axes_grid/examples/simple_axisline4.pdf deleted file mode 100644 index afdd31d52b2..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/examples/simple_axisline4.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/examples/simple_axisline4.py b/plot_directive/mpl_toolkits/axes_grid/examples/simple_axisline4.py deleted file mode 100644 index 3b2c675666b..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.hires.png deleted file mode 100644 index 520644ee017..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.pdf deleted file mode 100644 index 0d34f7cde8d..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.py b/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.py deleted file mode 100644 index 3ff931baa5c..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.hires.png deleted file mode 100644 index d44b14595d8..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.pdf deleted file mode 100644 index 16b0679e1e3..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.py b/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.py deleted file mode 100644 index bddedcea73d..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.hires.png deleted file mode 100644 index b7946d71e67..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.pdf deleted file mode 100644 index 4169b0e4ad8..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.py b/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.py deleted file mode 100644 index 69963d22ee6..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.hires.png deleted file mode 100644 index 002baeb483b..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.pdf deleted file mode 100644 index 5141a4b7736..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.py b/plot_directive/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.py deleted file mode 100644 index 2b5bf867393..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/demo_axis_direction.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/demo_axis_direction.hires.png deleted file mode 100644 index 5ac78c14e36..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/demo_axis_direction.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/demo_axis_direction.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/demo_axis_direction.pdf deleted file mode 100644 index 7a68229d4ed..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/demo_axis_direction.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/demo_axis_direction.py b/plot_directive/mpl_toolkits/axes_grid/figures/demo_axis_direction.py deleted file mode 100644 index a198b0b1959..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.hires.png deleted file mode 100644 index f6a3c9a9f54..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.pdf deleted file mode 100644 index aca813aeefd..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.py b/plot_directive/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.py deleted file mode 100644 index 78f81ad47df..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/parasite_simple.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/parasite_simple.hires.png deleted file mode 100644 index 472015e2367..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/parasite_simple.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/parasite_simple.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/parasite_simple.pdf deleted file mode 100644 index faaf9fb0a21..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/parasite_simple.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/parasite_simple.py b/plot_directive/mpl_toolkits/axes_grid/figures/parasite_simple.py deleted file mode 100644 index c66d3c2ce30..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider2.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider2.hires.png deleted file mode 100644 index 60e397e6709..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider2.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider2.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider2.pdf deleted file mode 100644 index b4799a50365..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider2.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider2.py b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider2.py deleted file mode 100644 index 7b866c3c058..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider3.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider3.hires.png deleted file mode 100644 index 7902a799849..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider3.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider3.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider3.pdf deleted file mode 100644 index 9e8dbe4534b..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider3.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider3.py b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axes_divider3.py deleted file mode 100644 index 203bdd5068e..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction01.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction01.hires.png deleted file mode 100644 index 0be6fc99f7c..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction01.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction01.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction01.pdf deleted file mode 100644 index 7d7baf44ca7..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction01.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction01.py b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction01.py deleted file mode 100644 index d182d582694..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction03.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction03.hires.png deleted file mode 100644 index d80317eb25b..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction03.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction03.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction03.pdf deleted file mode 100644 index 2cdbb3e6a20..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction03.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction03.py b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_direction03.py deleted file mode 100644 index 0cffb9ffe53..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_pad.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_pad.hires.png deleted file mode 100644 index 95ae6b52f42..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_pad.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_pad.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_pad.pdf deleted file mode 100644 index c63688fdae2..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_pad.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_pad.py b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axis_pad.py deleted file mode 100644 index bfbfb00b434..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisartist1.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisartist1.hires.png deleted file mode 100644 index a4ce0a41ffb..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisartist1.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisartist1.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisartist1.pdf deleted file mode 100644 index ea696dde85f..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisartist1.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisartist1.py b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisartist1.py deleted file mode 100644 index 6093ea205b6..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisline3.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisline3.hires.png deleted file mode 100644 index a558c3a8d08..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisline3.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisline3.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisline3.pdf deleted file mode 100644 index aad6d5885fe..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisline3.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisline3.py b/plot_directive/mpl_toolkits/axes_grid/figures/simple_axisline3.py deleted file mode 100644 index 68d42677cd5..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/simple_colorbar.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/simple_colorbar.hires.png deleted file mode 100644 index 7af7f3c1afa..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_colorbar.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_colorbar.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/simple_colorbar.pdf deleted file mode 100644 index 4d9c9e9e6da..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_colorbar.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_colorbar.py b/plot_directive/mpl_toolkits/axes_grid/figures/simple_colorbar.py deleted file mode 100644 index c2f67d9a16e..00000000000 --- a/plot_directive/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/plot_directive/mpl_toolkits/axes_grid/figures/simple_rgb.hires.png b/plot_directive/mpl_toolkits/axes_grid/figures/simple_rgb.hires.png deleted file mode 100644 index 705d36e3fc6..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_rgb.hires.png and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_rgb.pdf b/plot_directive/mpl_toolkits/axes_grid/figures/simple_rgb.pdf deleted file mode 100644 index 4f1498f6e75..00000000000 Binary files a/plot_directive/mpl_toolkits/axes_grid/figures/simple_rgb.pdf and /dev/null differ diff --git a/plot_directive/mpl_toolkits/axes_grid/figures/simple_rgb.py b/plot_directive/mpl_toolkits/axes_grid/figures/simple_rgb.py deleted file mode 100644 index 14379d3b9d4..00000000000 --- a/plot_directive/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/plot_directive/pyplots/align_ylabels.hires.png b/plot_directive/pyplots/align_ylabels.hires.png deleted file mode 100644 index 74e83967071..00000000000 Binary files a/plot_directive/pyplots/align_ylabels.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/align_ylabels.pdf b/plot_directive/pyplots/align_ylabels.pdf deleted file mode 100644 index 5fb78ebe02b..00000000000 Binary files a/plot_directive/pyplots/align_ylabels.pdf and /dev/null differ diff --git a/plot_directive/pyplots/align_ylabels.py b/plot_directive/pyplots/align_ylabels.py deleted file mode 100644 index 1241c183629..00000000000 --- a/plot_directive/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/plot_directive/pyplots/annotate_transform.hires.png b/plot_directive/pyplots/annotate_transform.hires.png deleted file mode 100644 index 1ce28401db6..00000000000 Binary files a/plot_directive/pyplots/annotate_transform.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/annotate_transform.pdf b/plot_directive/pyplots/annotate_transform.pdf deleted file mode 100644 index d87c99c83a8..00000000000 Binary files a/plot_directive/pyplots/annotate_transform.pdf and /dev/null differ diff --git a/plot_directive/pyplots/annotate_transform.py b/plot_directive/pyplots/annotate_transform.py deleted file mode 100644 index 1d39970e3f5..00000000000 --- a/plot_directive/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/plot_directive/pyplots/annotation_basic.hires.png b/plot_directive/pyplots/annotation_basic.hires.png deleted file mode 100644 index ba2bf025e50..00000000000 Binary files a/plot_directive/pyplots/annotation_basic.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/annotation_basic.pdf b/plot_directive/pyplots/annotation_basic.pdf deleted file mode 100644 index 38183c94d66..00000000000 Binary files a/plot_directive/pyplots/annotation_basic.pdf and /dev/null differ diff --git a/plot_directive/pyplots/annotation_basic.py b/plot_directive/pyplots/annotation_basic.py deleted file mode 100644 index 846afd7b901..00000000000 --- a/plot_directive/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/plot_directive/pyplots/annotation_polar.hires.png b/plot_directive/pyplots/annotation_polar.hires.png deleted file mode 100644 index 00e1ded8127..00000000000 Binary files a/plot_directive/pyplots/annotation_polar.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/annotation_polar.pdf b/plot_directive/pyplots/annotation_polar.pdf deleted file mode 100644 index 5e2d6b4e706..00000000000 Binary files a/plot_directive/pyplots/annotation_polar.pdf and /dev/null differ diff --git a/plot_directive/pyplots/annotation_polar.py b/plot_directive/pyplots/annotation_polar.py deleted file mode 100644 index 9eba8cfe0d7..00000000000 --- a/plot_directive/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/plot_directive/pyplots/auto_subplots_adjust.hires.png b/plot_directive/pyplots/auto_subplots_adjust.hires.png deleted file mode 100644 index 1ef1b6f8ffd..00000000000 Binary files a/plot_directive/pyplots/auto_subplots_adjust.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/auto_subplots_adjust.pdf b/plot_directive/pyplots/auto_subplots_adjust.pdf deleted file mode 100644 index fe6c7e5a2cf..00000000000 Binary files a/plot_directive/pyplots/auto_subplots_adjust.pdf and /dev/null differ diff --git a/plot_directive/pyplots/auto_subplots_adjust.py b/plot_directive/pyplots/auto_subplots_adjust.py deleted file mode 100644 index ca7f04144be..00000000000 --- a/plot_directive/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/plot_directive/pyplots/boxplot_demo.py b/plot_directive/pyplots/boxplot_demo.py deleted file mode 100644 index b5b46f2f1eb..00000000000 --- a/plot_directive/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/plot_directive/pyplots/boxplot_demo_00.hires.png b/plot_directive/pyplots/boxplot_demo_00.hires.png deleted file mode 100644 index 6b00e1431d1..00000000000 Binary files a/plot_directive/pyplots/boxplot_demo_00.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/boxplot_demo_00.pdf b/plot_directive/pyplots/boxplot_demo_00.pdf deleted file mode 100644 index 3274807e2ec..00000000000 Binary files a/plot_directive/pyplots/boxplot_demo_00.pdf and /dev/null differ diff --git a/plot_directive/pyplots/boxplot_demo_01.hires.png b/plot_directive/pyplots/boxplot_demo_01.hires.png deleted file mode 100644 index d135f768fd0..00000000000 Binary files a/plot_directive/pyplots/boxplot_demo_01.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/boxplot_demo_01.pdf b/plot_directive/pyplots/boxplot_demo_01.pdf deleted file mode 100644 index f54760a174f..00000000000 Binary files a/plot_directive/pyplots/boxplot_demo_01.pdf and /dev/null differ diff --git a/plot_directive/pyplots/boxplot_demo_02.hires.png b/plot_directive/pyplots/boxplot_demo_02.hires.png deleted file mode 100644 index 2a5434e55a8..00000000000 Binary files a/plot_directive/pyplots/boxplot_demo_02.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/boxplot_demo_02.pdf b/plot_directive/pyplots/boxplot_demo_02.pdf deleted file mode 100644 index f40c32746df..00000000000 Binary files a/plot_directive/pyplots/boxplot_demo_02.pdf and /dev/null differ diff --git a/plot_directive/pyplots/boxplot_demo_03.hires.png b/plot_directive/pyplots/boxplot_demo_03.hires.png deleted file mode 100644 index cfa46520164..00000000000 Binary files a/plot_directive/pyplots/boxplot_demo_03.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/boxplot_demo_03.pdf b/plot_directive/pyplots/boxplot_demo_03.pdf deleted file mode 100644 index b2dba7b3857..00000000000 Binary files a/plot_directive/pyplots/boxplot_demo_03.pdf and /dev/null differ diff --git a/plot_directive/pyplots/boxplot_demo_04.hires.png b/plot_directive/pyplots/boxplot_demo_04.hires.png deleted file mode 100644 index b9a3f5218eb..00000000000 Binary files a/plot_directive/pyplots/boxplot_demo_04.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/boxplot_demo_04.pdf b/plot_directive/pyplots/boxplot_demo_04.pdf deleted file mode 100644 index 173dcdb2411..00000000000 Binary files a/plot_directive/pyplots/boxplot_demo_04.pdf and /dev/null differ diff --git a/plot_directive/pyplots/boxplot_demo_05.hires.png b/plot_directive/pyplots/boxplot_demo_05.hires.png deleted file mode 100644 index 9eb7c76daf7..00000000000 Binary files a/plot_directive/pyplots/boxplot_demo_05.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/boxplot_demo_05.pdf b/plot_directive/pyplots/boxplot_demo_05.pdf deleted file mode 100644 index ae23cae845d..00000000000 Binary files a/plot_directive/pyplots/boxplot_demo_05.pdf and /dev/null differ diff --git a/plot_directive/pyplots/boxplot_demo_06.hires.png b/plot_directive/pyplots/boxplot_demo_06.hires.png deleted file mode 100644 index cc2e6992927..00000000000 Binary files a/plot_directive/pyplots/boxplot_demo_06.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/boxplot_demo_06.pdf b/plot_directive/pyplots/boxplot_demo_06.pdf deleted file mode 100644 index 98e10800671..00000000000 Binary files a/plot_directive/pyplots/boxplot_demo_06.pdf and /dev/null differ diff --git a/plot_directive/pyplots/compound_path_demo.hires.png b/plot_directive/pyplots/compound_path_demo.hires.png deleted file mode 100644 index ab14ef7e7ad..00000000000 Binary files a/plot_directive/pyplots/compound_path_demo.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/compound_path_demo.pdf b/plot_directive/pyplots/compound_path_demo.pdf deleted file mode 100644 index a6de32b4ee1..00000000000 Binary files a/plot_directive/pyplots/compound_path_demo.pdf and /dev/null differ diff --git a/plot_directive/pyplots/compound_path_demo.py b/plot_directive/pyplots/compound_path_demo.py deleted file mode 100644 index 06f32ffcbf4..00000000000 --- a/plot_directive/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/plot_directive/pyplots/dollar_ticks.hires.png b/plot_directive/pyplots/dollar_ticks.hires.png deleted file mode 100644 index 60ab86d1adf..00000000000 Binary files a/plot_directive/pyplots/dollar_ticks.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/dollar_ticks.pdf b/plot_directive/pyplots/dollar_ticks.pdf deleted file mode 100644 index 8a8e9090cdd..00000000000 Binary files a/plot_directive/pyplots/dollar_ticks.pdf and /dev/null differ diff --git a/plot_directive/pyplots/dollar_ticks.py b/plot_directive/pyplots/dollar_ticks.py deleted file mode 100644 index c54b17b91b7..00000000000 --- a/plot_directive/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/plot_directive/pyplots/fig_axes_customize_simple.hires.png b/plot_directive/pyplots/fig_axes_customize_simple.hires.png deleted file mode 100644 index 5a2a663798a..00000000000 Binary files a/plot_directive/pyplots/fig_axes_customize_simple.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/fig_axes_customize_simple.pdf b/plot_directive/pyplots/fig_axes_customize_simple.pdf deleted file mode 100644 index 31220b556bf..00000000000 Binary files a/plot_directive/pyplots/fig_axes_customize_simple.pdf and /dev/null differ diff --git a/plot_directive/pyplots/fig_axes_customize_simple.py b/plot_directive/pyplots/fig_axes_customize_simple.py deleted file mode 100644 index 797cd3389a7..00000000000 --- a/plot_directive/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/plot_directive/pyplots/fig_axes_labels_simple.hires.png b/plot_directive/pyplots/fig_axes_labels_simple.hires.png deleted file mode 100644 index c526f43ec29..00000000000 Binary files a/plot_directive/pyplots/fig_axes_labels_simple.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/fig_axes_labels_simple.pdf b/plot_directive/pyplots/fig_axes_labels_simple.pdf deleted file mode 100644 index 41ae795f3c8..00000000000 Binary files a/plot_directive/pyplots/fig_axes_labels_simple.pdf and /dev/null differ diff --git a/plot_directive/pyplots/fig_axes_labels_simple.py b/plot_directive/pyplots/fig_axes_labels_simple.py deleted file mode 100644 index 7fd2c53a4f2..00000000000 --- a/plot_directive/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/plot_directive/pyplots/fig_x.hires.png b/plot_directive/pyplots/fig_x.hires.png deleted file mode 100644 index a020c7442fa..00000000000 Binary files a/plot_directive/pyplots/fig_x.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/fig_x.pdf b/plot_directive/pyplots/fig_x.pdf deleted file mode 100644 index 5141ec2a2a6..00000000000 Binary files a/plot_directive/pyplots/fig_x.pdf and /dev/null differ diff --git a/plot_directive/pyplots/fig_x.py b/plot_directive/pyplots/fig_x.py deleted file mode 100644 index 1ab41294942..00000000000 --- a/plot_directive/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/plot_directive/pyplots/plotmap.hires.png b/plot_directive/pyplots/plotmap.hires.png deleted file mode 100644 index 733d7bcbcc0..00000000000 Binary files a/plot_directive/pyplots/plotmap.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/plotmap.pdf b/plot_directive/pyplots/plotmap.pdf deleted file mode 100644 index fad799d59f2..00000000000 Binary files a/plot_directive/pyplots/plotmap.pdf and /dev/null differ diff --git a/plot_directive/pyplots/plotmap.py b/plot_directive/pyplots/plotmap.py deleted file mode 100644 index 7d3267da7ab..00000000000 --- a/plot_directive/pyplots/plotmap.py +++ /dev/null @@ -1,62 +0,0 @@ -# make plot of etopo bathymetry/topography data on -# lambert conformal conic map projection, drawing coastlines, state and -# country boundaries, and parallels/meridians. - -# the data is interpolated to the native projection grid. -import os -from mpl_toolkits.basemap import Basemap, shiftgrid -import numpy as np - -from pylab import title, colorbar, show, axes, cm, arange, figure, \ - text -from matplotlib.cbook import get_sample_data - -# read in topo data (on a regular lat/lon grid) -# longitudes go from 20 to 380. -topoin = np.loadtxt(get_sample_data('screenshots/etopo20data.gz').name) -lons = np.loadtxt(get_sample_data('screenshots/etopo20lons.gz').name) -lats = np.loadtxt(get_sample_data('screenshots/etopo20lats.gz').name) -# shift data so lons go from -180 to 180 instead of 20 to 380. -topoin,lons = shiftgrid(180.,topoin,lons,start=False) - -# setup of basemap ('lcc' = lambert conformal conic). -# use major and minor sphere radii from WGS84 ellipsoid. -m = Basemap(llcrnrlon=-145.5,llcrnrlat=1.,urcrnrlon=-2.566,urcrnrlat=46.352,\ - rsphere=(6378137.00,6356752.3142),\ - resolution='l',area_thresh=1000.,projection='lcc',\ - lat_1=50.,lon_0=-107.) -# transform to nx x ny regularly spaced native projection grid -nx = int((m.xmax-m.xmin)/40000.)+1; ny = int((m.ymax-m.ymin)/40000.)+1 -topodat,x,y = m.transform_scalar(topoin,lons,lats,nx,ny,returnxy=True) -# create the figure. -fig=figure(figsize=(6,6)) -# add an axes, leaving room for colorbar on the right. -ax = fig.add_axes([0.1,0.1,0.7,0.7]) -# plot image over map with imshow. -im = m.imshow(topodat,cm.jet) -# setup colorbar axes instance. -# for matplotlib 0.91 and earlier, could do l,b,w,h = ax.get_position() -# for post 0.91, pos = ax.get_position(); l,b,w,h = pos.bounds -# this works for both. -pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) -cax = axes([l+w+0.075, b, 0.05, h]) -colorbar(cax=cax) # draw colorbar -axes(ax) # make the original axes current again -# plot blue dot on boulder, colorado and label it as such. -xpt,ypt = m(-104.237,40.125) -m.plot([xpt],[ypt],'bo') -text(xpt+100000,ypt+100000,'Boulder') -# draw coastlines and political boundaries. -m.drawcoastlines() -m.drawcountries() -m.drawstates() -# draw parallels and meridians. -# label on left, right and bottom of map. -parallels = arange(0.,80,20.) -m.drawparallels(parallels,labels=[1,1,0,1]) -meridians = arange(10.,360.,30.) -m.drawmeridians(meridians,labels=[1,1,0,1]) -# set title. -title('ETOPO Topography - Lambert Conformal Conic') -show() diff --git a/plot_directive/pyplots/pyplot_annotate.hires.png b/plot_directive/pyplots/pyplot_annotate.hires.png deleted file mode 100644 index ba2bf025e50..00000000000 Binary files a/plot_directive/pyplots/pyplot_annotate.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/pyplot_annotate.pdf b/plot_directive/pyplots/pyplot_annotate.pdf deleted file mode 100644 index 1a4c649bfb5..00000000000 Binary files a/plot_directive/pyplots/pyplot_annotate.pdf and /dev/null differ diff --git a/plot_directive/pyplots/pyplot_annotate.py b/plot_directive/pyplots/pyplot_annotate.py deleted file mode 100644 index 88390ca7c07..00000000000 --- a/plot_directive/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/plot_directive/pyplots/pyplot_formatstr.hires.png b/plot_directive/pyplots/pyplot_formatstr.hires.png deleted file mode 100644 index b504eea81ac..00000000000 Binary files a/plot_directive/pyplots/pyplot_formatstr.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/pyplot_formatstr.pdf b/plot_directive/pyplots/pyplot_formatstr.pdf deleted file mode 100644 index 5d0afac275e..00000000000 Binary files a/plot_directive/pyplots/pyplot_formatstr.pdf and /dev/null differ diff --git a/plot_directive/pyplots/pyplot_formatstr.py b/plot_directive/pyplots/pyplot_formatstr.py deleted file mode 100644 index 2c4f425da97..00000000000 --- a/plot_directive/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/plot_directive/pyplots/pyplot_mathtext.hires.png b/plot_directive/pyplots/pyplot_mathtext.hires.png deleted file mode 100644 index 6dd12130cef..00000000000 Binary files a/plot_directive/pyplots/pyplot_mathtext.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/pyplot_mathtext.pdf b/plot_directive/pyplots/pyplot_mathtext.pdf deleted file mode 100644 index 73002320b96..00000000000 Binary files a/plot_directive/pyplots/pyplot_mathtext.pdf and /dev/null differ diff --git a/plot_directive/pyplots/pyplot_mathtext.py b/plot_directive/pyplots/pyplot_mathtext.py deleted file mode 100644 index 9ee51eabd41..00000000000 --- a/plot_directive/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/plot_directive/pyplots/pyplot_simple.hires.png b/plot_directive/pyplots/pyplot_simple.hires.png deleted file mode 100644 index f544a82b12f..00000000000 Binary files a/plot_directive/pyplots/pyplot_simple.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/pyplot_simple.pdf b/plot_directive/pyplots/pyplot_simple.pdf deleted file mode 100644 index ece313349d3..00000000000 Binary files a/plot_directive/pyplots/pyplot_simple.pdf and /dev/null differ diff --git a/plot_directive/pyplots/pyplot_simple.py b/plot_directive/pyplots/pyplot_simple.py deleted file mode 100644 index 46b9f225a97..00000000000 --- a/plot_directive/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/plot_directive/pyplots/pyplot_text.hires.png b/plot_directive/pyplots/pyplot_text.hires.png deleted file mode 100644 index 8d201ba0e7f..00000000000 Binary files a/plot_directive/pyplots/pyplot_text.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/pyplot_text.pdf b/plot_directive/pyplots/pyplot_text.pdf deleted file mode 100644 index b55a8e4ca17..00000000000 Binary files a/plot_directive/pyplots/pyplot_text.pdf and /dev/null differ diff --git a/plot_directive/pyplots/pyplot_text.py b/plot_directive/pyplots/pyplot_text.py deleted file mode 100644 index 64f2441485b..00000000000 --- a/plot_directive/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/plot_directive/pyplots/pyplot_three.hires.png b/plot_directive/pyplots/pyplot_three.hires.png deleted file mode 100644 index c7495243207..00000000000 Binary files a/plot_directive/pyplots/pyplot_three.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/pyplot_three.pdf b/plot_directive/pyplots/pyplot_three.pdf deleted file mode 100644 index 0e79f337d6f..00000000000 Binary files a/plot_directive/pyplots/pyplot_three.pdf and /dev/null differ diff --git a/plot_directive/pyplots/pyplot_three.py b/plot_directive/pyplots/pyplot_three.py deleted file mode 100644 index ecb200e6b41..00000000000 --- a/plot_directive/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/plot_directive/pyplots/pyplot_two_subplots.hires.png b/plot_directive/pyplots/pyplot_two_subplots.hires.png deleted file mode 100644 index 6630ae5f37b..00000000000 Binary files a/plot_directive/pyplots/pyplot_two_subplots.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/pyplot_two_subplots.pdf b/plot_directive/pyplots/pyplot_two_subplots.pdf deleted file mode 100644 index f9ea09e4fc8..00000000000 Binary files a/plot_directive/pyplots/pyplot_two_subplots.pdf and /dev/null differ diff --git a/plot_directive/pyplots/pyplot_two_subplots.py b/plot_directive/pyplots/pyplot_two_subplots.py deleted file mode 100644 index 2a1af9fec45..00000000000 --- a/plot_directive/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/plot_directive/pyplots/tex_demo.hires.png b/plot_directive/pyplots/tex_demo.hires.png deleted file mode 100644 index cdd62f23633..00000000000 Binary files a/plot_directive/pyplots/tex_demo.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/tex_demo.pdf b/plot_directive/pyplots/tex_demo.pdf deleted file mode 100644 index c0309f5958e..00000000000 Binary files a/plot_directive/pyplots/tex_demo.pdf and /dev/null differ diff --git a/plot_directive/pyplots/tex_demo.py b/plot_directive/pyplots/tex_demo.py deleted file mode 100644 index 3bdbb77a816..00000000000 --- a/plot_directive/pyplots/tex_demo.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python -""" -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 - -""" -from matplotlib import rc -from numpy import arange, cos, pi -from matplotlib.pyplot import figure, axes, plot, xlabel, ylabel, title, \ - grid, savefig, show - - -rc('text', usetex=True) -rc('font', family='serif') -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{voltage (mV)}',fontsize=16) -title(r"\TeX\ is Number $\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!", - fontsize=16, color='r') -grid(True) -savefig('tex_demo') - - -show() diff --git a/plot_directive/pyplots/text_commands.hires.png b/plot_directive/pyplots/text_commands.hires.png deleted file mode 100644 index f5215f9ce3f..00000000000 Binary files a/plot_directive/pyplots/text_commands.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/text_commands.pdf b/plot_directive/pyplots/text_commands.pdf deleted file mode 100644 index 9930ebcd230..00000000000 Binary files a/plot_directive/pyplots/text_commands.pdf and /dev/null differ diff --git a/plot_directive/pyplots/text_commands.py b/plot_directive/pyplots/text_commands.py deleted file mode 100644 index 93b2fcd8030..00000000000 --- a/plot_directive/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/plot_directive/pyplots/text_layout.hires.png b/plot_directive/pyplots/text_layout.hires.png deleted file mode 100644 index aebe66e7dd7..00000000000 Binary files a/plot_directive/pyplots/text_layout.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/text_layout.pdf b/plot_directive/pyplots/text_layout.pdf deleted file mode 100644 index ab8115fff5c..00000000000 Binary files a/plot_directive/pyplots/text_layout.pdf and /dev/null differ diff --git a/plot_directive/pyplots/text_layout.py b/plot_directive/pyplots/text_layout.py deleted file mode 100644 index 860c20d2211..00000000000 --- a/plot_directive/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/plot_directive/pyplots/whats_new_1_subplot3d.hires.png b/plot_directive/pyplots/whats_new_1_subplot3d.hires.png deleted file mode 100644 index 9e0da36b108..00000000000 Binary files a/plot_directive/pyplots/whats_new_1_subplot3d.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/whats_new_1_subplot3d.pdf b/plot_directive/pyplots/whats_new_1_subplot3d.pdf deleted file mode 100644 index 8f86a41e123..00000000000 Binary files a/plot_directive/pyplots/whats_new_1_subplot3d.pdf and /dev/null differ diff --git a/plot_directive/pyplots/whats_new_1_subplot3d.py b/plot_directive/pyplots/whats_new_1_subplot3d.py deleted file mode 100644 index 379157b0c5e..00000000000 --- a/plot_directive/pyplots/whats_new_1_subplot3d.py +++ /dev/null @@ -1,30 +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() - diff --git a/plot_directive/pyplots/whats_new_98_4_fancy.hires.png b/plot_directive/pyplots/whats_new_98_4_fancy.hires.png deleted file mode 100644 index f29150a279e..00000000000 Binary files a/plot_directive/pyplots/whats_new_98_4_fancy.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/whats_new_98_4_fancy.pdf b/plot_directive/pyplots/whats_new_98_4_fancy.pdf deleted file mode 100644 index 047b17f21de..00000000000 Binary files a/plot_directive/pyplots/whats_new_98_4_fancy.pdf and /dev/null differ diff --git a/plot_directive/pyplots/whats_new_98_4_fancy.py b/plot_directive/pyplots/whats_new_98_4_fancy.py deleted file mode 100644 index dc6c1d4c9fb..00000000000 --- a/plot_directive/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/plot_directive/pyplots/whats_new_98_4_fill_between.hires.png b/plot_directive/pyplots/whats_new_98_4_fill_between.hires.png deleted file mode 100644 index 04cf374a217..00000000000 Binary files a/plot_directive/pyplots/whats_new_98_4_fill_between.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/whats_new_98_4_fill_between.pdf b/plot_directive/pyplots/whats_new_98_4_fill_between.pdf deleted file mode 100644 index a4e267327ec..00000000000 Binary files a/plot_directive/pyplots/whats_new_98_4_fill_between.pdf and /dev/null differ diff --git a/plot_directive/pyplots/whats_new_98_4_fill_between.py b/plot_directive/pyplots/whats_new_98_4_fill_between.py deleted file mode 100644 index ea5f46d93de..00000000000 --- a/plot_directive/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/plot_directive/pyplots/whats_new_98_4_legend.hires.png b/plot_directive/pyplots/whats_new_98_4_legend.hires.png deleted file mode 100644 index 89417cf5276..00000000000 Binary files a/plot_directive/pyplots/whats_new_98_4_legend.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/whats_new_98_4_legend.pdf b/plot_directive/pyplots/whats_new_98_4_legend.pdf deleted file mode 100644 index b9a3e86adfd..00000000000 Binary files a/plot_directive/pyplots/whats_new_98_4_legend.pdf and /dev/null differ diff --git a/plot_directive/pyplots/whats_new_98_4_legend.py b/plot_directive/pyplots/whats_new_98_4_legend.py deleted file mode 100644 index 2a806126f3c..00000000000 --- a/plot_directive/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/plot_directive/pyplots/whats_new_99_axes_grid.hires.png b/plot_directive/pyplots/whats_new_99_axes_grid.hires.png deleted file mode 100644 index fca2a353643..00000000000 Binary files a/plot_directive/pyplots/whats_new_99_axes_grid.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/whats_new_99_axes_grid.pdf b/plot_directive/pyplots/whats_new_99_axes_grid.pdf deleted file mode 100644 index 55fbbcb1d26..00000000000 Binary files a/plot_directive/pyplots/whats_new_99_axes_grid.pdf and /dev/null differ diff --git a/plot_directive/pyplots/whats_new_99_axes_grid.py b/plot_directive/pyplots/whats_new_99_axes_grid.py deleted file mode 100644 index e3cb7fa4217..00000000000 --- a/plot_directive/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/plot_directive/pyplots/whats_new_99_mplot3d.hires.png b/plot_directive/pyplots/whats_new_99_mplot3d.hires.png deleted file mode 100644 index 9e585e21f2a..00000000000 Binary files a/plot_directive/pyplots/whats_new_99_mplot3d.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/whats_new_99_mplot3d.pdf b/plot_directive/pyplots/whats_new_99_mplot3d.pdf deleted file mode 100644 index a5a056a0986..00000000000 Binary files a/plot_directive/pyplots/whats_new_99_mplot3d.pdf and /dev/null differ diff --git a/plot_directive/pyplots/whats_new_99_mplot3d.py b/plot_directive/pyplots/whats_new_99_mplot3d.py deleted file mode 100644 index d3e22c9b58e..00000000000 --- a/plot_directive/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/plot_directive/pyplots/whats_new_99_spines.hires.png b/plot_directive/pyplots/whats_new_99_spines.hires.png deleted file mode 100644 index 78edd4a5b59..00000000000 Binary files a/plot_directive/pyplots/whats_new_99_spines.hires.png and /dev/null differ diff --git a/plot_directive/pyplots/whats_new_99_spines.pdf b/plot_directive/pyplots/whats_new_99_spines.pdf deleted file mode 100644 index d7d85605b06..00000000000 Binary files a/plot_directive/pyplots/whats_new_99_spines.pdf and /dev/null differ diff --git a/plot_directive/pyplots/whats_new_99_spines.py b/plot_directive/pyplots/whats_new_99_spines.py deleted file mode 100644 index 1ee80a9e708..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/anchored_box01.hires.png b/plot_directive/users/plotting/examples/anchored_box01.hires.png deleted file mode 100644 index 310bdd0f0f4..00000000000 Binary files a/plot_directive/users/plotting/examples/anchored_box01.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/anchored_box01.pdf b/plot_directive/users/plotting/examples/anchored_box01.pdf deleted file mode 100644 index e2177c42789..00000000000 Binary files a/plot_directive/users/plotting/examples/anchored_box01.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/anchored_box01.py b/plot_directive/users/plotting/examples/anchored_box01.py deleted file mode 100644 index 517a2f88d15..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/anchored_box02.hires.png b/plot_directive/users/plotting/examples/anchored_box02.hires.png deleted file mode 100644 index cdfae0181a9..00000000000 Binary files a/plot_directive/users/plotting/examples/anchored_box02.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/anchored_box02.pdf b/plot_directive/users/plotting/examples/anchored_box02.pdf deleted file mode 100644 index b0b6e3f9c89..00000000000 Binary files a/plot_directive/users/plotting/examples/anchored_box02.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/anchored_box02.py b/plot_directive/users/plotting/examples/anchored_box02.py deleted file mode 100644 index 6f8db6dd8de..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/anchored_box03.hires.png b/plot_directive/users/plotting/examples/anchored_box03.hires.png deleted file mode 100644 index f083a931793..00000000000 Binary files a/plot_directive/users/plotting/examples/anchored_box03.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/anchored_box03.pdf b/plot_directive/users/plotting/examples/anchored_box03.pdf deleted file mode 100644 index 0846e945dbb..00000000000 Binary files a/plot_directive/users/plotting/examples/anchored_box03.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/anchored_box03.py b/plot_directive/users/plotting/examples/anchored_box03.py deleted file mode 100644 index 0848e1b9d27..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/anchored_box04.hires.png b/plot_directive/users/plotting/examples/anchored_box04.hires.png deleted file mode 100644 index 892224ff173..00000000000 Binary files a/plot_directive/users/plotting/examples/anchored_box04.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/anchored_box04.pdf b/plot_directive/users/plotting/examples/anchored_box04.pdf deleted file mode 100644 index 616587d7e6c..00000000000 Binary files a/plot_directive/users/plotting/examples/anchored_box04.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/anchored_box04.py b/plot_directive/users/plotting/examples/anchored_box04.py deleted file mode 100644 index 570c7316214..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/annotate_explain.hires.png b/plot_directive/users/plotting/examples/annotate_explain.hires.png deleted file mode 100644 index 7fe0c184a88..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_explain.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_explain.pdf b/plot_directive/users/plotting/examples/annotate_explain.pdf deleted file mode 100644 index d460739541b..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_explain.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_explain.py b/plot_directive/users/plotting/examples/annotate_explain.py deleted file mode 100644 index 6dadbd5e541..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/annotate_simple01.hires.png b/plot_directive/users/plotting/examples/annotate_simple01.hires.png deleted file mode 100644 index 0ef37bcd2da..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_simple01.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_simple01.pdf b/plot_directive/users/plotting/examples/annotate_simple01.pdf deleted file mode 100644 index ff167fa2c4d..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_simple01.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_simple01.py b/plot_directive/users/plotting/examples/annotate_simple01.py deleted file mode 100644 index 1a376b66f5b..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/annotate_simple02.hires.png b/plot_directive/users/plotting/examples/annotate_simple02.hires.png deleted file mode 100644 index 7f08916dd5d..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_simple02.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_simple02.pdf b/plot_directive/users/plotting/examples/annotate_simple02.pdf deleted file mode 100644 index b9093b4a0cf..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_simple02.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_simple02.py b/plot_directive/users/plotting/examples/annotate_simple02.py deleted file mode 100644 index 25bb0002de5..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/annotate_simple03.hires.png b/plot_directive/users/plotting/examples/annotate_simple03.hires.png deleted file mode 100644 index bcab7cea479..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_simple03.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_simple03.pdf b/plot_directive/users/plotting/examples/annotate_simple03.pdf deleted file mode 100644 index 25074985f15..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_simple03.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_simple03.py b/plot_directive/users/plotting/examples/annotate_simple03.py deleted file mode 100644 index 61a885afd2a..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/annotate_simple04.hires.png b/plot_directive/users/plotting/examples/annotate_simple04.hires.png deleted file mode 100644 index 5fbe79b9f2b..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_simple04.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_simple04.pdf b/plot_directive/users/plotting/examples/annotate_simple04.pdf deleted file mode 100644 index b4b14679128..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_simple04.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_simple04.py b/plot_directive/users/plotting/examples/annotate_simple04.py deleted file mode 100644 index cdbb1d80417..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/annotate_simple_coord01.hires.png b/plot_directive/users/plotting/examples/annotate_simple_coord01.hires.png deleted file mode 100644 index 8f9e305f9b1..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_simple_coord01.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_simple_coord01.pdf b/plot_directive/users/plotting/examples/annotate_simple_coord01.pdf deleted file mode 100644 index 657a3f51c42..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_simple_coord01.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_simple_coord01.py b/plot_directive/users/plotting/examples/annotate_simple_coord01.py deleted file mode 100644 index 7b53d0c2297..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/annotate_simple_coord02.hires.png b/plot_directive/users/plotting/examples/annotate_simple_coord02.hires.png deleted file mode 100644 index 525434f1a5d..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_simple_coord02.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_simple_coord02.pdf b/plot_directive/users/plotting/examples/annotate_simple_coord02.pdf deleted file mode 100644 index 6670da7acf8..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_simple_coord02.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_simple_coord02.py b/plot_directive/users/plotting/examples/annotate_simple_coord02.py deleted file mode 100644 index d2ce74dc6cf..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/annotate_simple_coord03.hires.png b/plot_directive/users/plotting/examples/annotate_simple_coord03.hires.png deleted file mode 100644 index fa1280cb44c..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_simple_coord03.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_simple_coord03.pdf b/plot_directive/users/plotting/examples/annotate_simple_coord03.pdf deleted file mode 100644 index 9b9c3acdd73..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_simple_coord03.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_simple_coord03.py b/plot_directive/users/plotting/examples/annotate_simple_coord03.py deleted file mode 100644 index b448f7513ca..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/annotate_text_arrow.hires.png b/plot_directive/users/plotting/examples/annotate_text_arrow.hires.png deleted file mode 100644 index 47a3113cea3..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_text_arrow.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_text_arrow.pdf b/plot_directive/users/plotting/examples/annotate_text_arrow.pdf deleted file mode 100644 index 1479dbfe98e..00000000000 Binary files a/plot_directive/users/plotting/examples/annotate_text_arrow.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/annotate_text_arrow.py b/plot_directive/users/plotting/examples/annotate_text_arrow.py deleted file mode 100644 index 4ed10f99670..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/connect_simple01.hires.png b/plot_directive/users/plotting/examples/connect_simple01.hires.png deleted file mode 100644 index f3810b0084c..00000000000 Binary files a/plot_directive/users/plotting/examples/connect_simple01.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/connect_simple01.pdf b/plot_directive/users/plotting/examples/connect_simple01.pdf deleted file mode 100644 index 15e947cce8a..00000000000 Binary files a/plot_directive/users/plotting/examples/connect_simple01.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/connect_simple01.py b/plot_directive/users/plotting/examples/connect_simple01.py deleted file mode 100644 index 7e251ca6bc2..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/connectionstyle_demo.hires.png b/plot_directive/users/plotting/examples/connectionstyle_demo.hires.png deleted file mode 100644 index 71aba35df21..00000000000 Binary files a/plot_directive/users/plotting/examples/connectionstyle_demo.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/connectionstyle_demo.pdf b/plot_directive/users/plotting/examples/connectionstyle_demo.pdf deleted file mode 100644 index 19ed6bb7421..00000000000 Binary files a/plot_directive/users/plotting/examples/connectionstyle_demo.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/connectionstyle_demo.py b/plot_directive/users/plotting/examples/connectionstyle_demo.py deleted file mode 100644 index baa68fab5ad..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/custom_boxstyle01.hires.png b/plot_directive/users/plotting/examples/custom_boxstyle01.hires.png deleted file mode 100644 index 115e496d77f..00000000000 Binary files a/plot_directive/users/plotting/examples/custom_boxstyle01.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/custom_boxstyle01.pdf b/plot_directive/users/plotting/examples/custom_boxstyle01.pdf deleted file mode 100644 index 0de83564fa5..00000000000 Binary files a/plot_directive/users/plotting/examples/custom_boxstyle01.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/custom_boxstyle01.py b/plot_directive/users/plotting/examples/custom_boxstyle01.py deleted file mode 100644 index f53f135d38e..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/custom_boxstyle02.hires.png b/plot_directive/users/plotting/examples/custom_boxstyle02.hires.png deleted file mode 100644 index 1af33d1296a..00000000000 Binary files a/plot_directive/users/plotting/examples/custom_boxstyle02.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/custom_boxstyle02.pdf b/plot_directive/users/plotting/examples/custom_boxstyle02.pdf deleted file mode 100644 index 2bac107c13b..00000000000 Binary files a/plot_directive/users/plotting/examples/custom_boxstyle02.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/custom_boxstyle02.py b/plot_directive/users/plotting/examples/custom_boxstyle02.py deleted file mode 100644 index 96933cb0689..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/demo_gridspec01.hires.png b/plot_directive/users/plotting/examples/demo_gridspec01.hires.png deleted file mode 100644 index 053b367fdba..00000000000 Binary files a/plot_directive/users/plotting/examples/demo_gridspec01.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/demo_gridspec01.pdf b/plot_directive/users/plotting/examples/demo_gridspec01.pdf deleted file mode 100644 index 67b16471d35..00000000000 Binary files a/plot_directive/users/plotting/examples/demo_gridspec01.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/demo_gridspec01.py b/plot_directive/users/plotting/examples/demo_gridspec01.py deleted file mode 100644 index 55c76a7f0f4..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/demo_gridspec02.hires.png b/plot_directive/users/plotting/examples/demo_gridspec02.hires.png deleted file mode 100644 index af33150d40d..00000000000 Binary files a/plot_directive/users/plotting/examples/demo_gridspec02.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/demo_gridspec02.pdf b/plot_directive/users/plotting/examples/demo_gridspec02.pdf deleted file mode 100644 index 185d8d7687e..00000000000 Binary files a/plot_directive/users/plotting/examples/demo_gridspec02.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/demo_gridspec02.py b/plot_directive/users/plotting/examples/demo_gridspec02.py deleted file mode 100644 index 43a7f089940..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/demo_gridspec03.hires.png b/plot_directive/users/plotting/examples/demo_gridspec03.hires.png deleted file mode 100644 index ee89da28e47..00000000000 Binary files a/plot_directive/users/plotting/examples/demo_gridspec03.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/demo_gridspec03.pdf b/plot_directive/users/plotting/examples/demo_gridspec03.pdf deleted file mode 100644 index 81d4dfa1357..00000000000 Binary files a/plot_directive/users/plotting/examples/demo_gridspec03.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/demo_gridspec03.py b/plot_directive/users/plotting/examples/demo_gridspec03.py deleted file mode 100644 index eb5829507ab..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/demo_gridspec04.hires.png b/plot_directive/users/plotting/examples/demo_gridspec04.hires.png deleted file mode 100644 index 20ec3bee168..00000000000 Binary files a/plot_directive/users/plotting/examples/demo_gridspec04.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/demo_gridspec04.pdf b/plot_directive/users/plotting/examples/demo_gridspec04.pdf deleted file mode 100644 index bc0a7313aa5..00000000000 Binary files a/plot_directive/users/plotting/examples/demo_gridspec04.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/demo_gridspec04.py b/plot_directive/users/plotting/examples/demo_gridspec04.py deleted file mode 100644 index f948b13d91e..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/demo_gridspec05.hires.png b/plot_directive/users/plotting/examples/demo_gridspec05.hires.png deleted file mode 100644 index b0910d32bae..00000000000 Binary files a/plot_directive/users/plotting/examples/demo_gridspec05.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/demo_gridspec05.pdf b/plot_directive/users/plotting/examples/demo_gridspec05.pdf deleted file mode 100644 index 1953ae053d2..00000000000 Binary files a/plot_directive/users/plotting/examples/demo_gridspec05.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/demo_gridspec05.py b/plot_directive/users/plotting/examples/demo_gridspec05.py deleted file mode 100644 index 6bc263a8933..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/simple_legend01.hires.png b/plot_directive/users/plotting/examples/simple_legend01.hires.png deleted file mode 100644 index d1df2e2f8dc..00000000000 Binary files a/plot_directive/users/plotting/examples/simple_legend01.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/simple_legend01.pdf b/plot_directive/users/plotting/examples/simple_legend01.pdf deleted file mode 100644 index a7693fdcef3..00000000000 Binary files a/plot_directive/users/plotting/examples/simple_legend01.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/simple_legend01.py b/plot_directive/users/plotting/examples/simple_legend01.py deleted file mode 100644 index dba1b4c2d41..00000000000 --- a/plot_directive/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/plot_directive/users/plotting/examples/simple_legend02.hires.png b/plot_directive/users/plotting/examples/simple_legend02.hires.png deleted file mode 100644 index b48776bd069..00000000000 Binary files a/plot_directive/users/plotting/examples/simple_legend02.hires.png and /dev/null differ diff --git a/plot_directive/users/plotting/examples/simple_legend02.pdf b/plot_directive/users/plotting/examples/simple_legend02.pdf deleted file mode 100644 index 85935f80b6a..00000000000 Binary files a/plot_directive/users/plotting/examples/simple_legend02.pdf and /dev/null differ diff --git a/plot_directive/users/plotting/examples/simple_legend02.py b/plot_directive/users/plotting/examples/simple_legend02.py deleted file mode 100644 index 9b02001972d..00000000000 --- a/plot_directive/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/users/plotting/colormaps/grayscale_00.hires.png b/users/plotting/colormaps/grayscale_00.hires.png deleted file mode 100644 index d1ee6d0c551..00000000000 Binary files a/users/plotting/colormaps/grayscale_00.hires.png and /dev/null differ diff --git a/users/plotting/colormaps/grayscale_00.pdf b/users/plotting/colormaps/grayscale_00.pdf deleted file mode 100644 index caf3958105f..00000000000 Binary files a/users/plotting/colormaps/grayscale_00.pdf and /dev/null differ diff --git a/users/plotting/colormaps/grayscale_00.png b/users/plotting/colormaps/grayscale_00.png deleted file mode 100644 index 94c7f8a85ce..00000000000 Binary files a/users/plotting/colormaps/grayscale_00.png and /dev/null differ diff --git a/users/plotting/colormaps/grayscale_01.hires.png b/users/plotting/colormaps/grayscale_01.hires.png deleted file mode 100644 index 71ffeb5e485..00000000000 Binary files a/users/plotting/colormaps/grayscale_01.hires.png and /dev/null differ diff --git a/users/plotting/colormaps/grayscale_01.pdf b/users/plotting/colormaps/grayscale_01.pdf deleted file mode 100644 index f7fb7a78dbc..00000000000 Binary files a/users/plotting/colormaps/grayscale_01.pdf and /dev/null differ diff --git a/users/plotting/colormaps/grayscale_01.png b/users/plotting/colormaps/grayscale_01.png deleted file mode 100644 index e9c3c4031ee..00000000000 Binary files a/users/plotting/colormaps/grayscale_01.png and /dev/null differ diff --git a/users/plotting/colormaps/grayscale_02.hires.png b/users/plotting/colormaps/grayscale_02.hires.png deleted file mode 100644 index 1f8674b710c..00000000000 Binary files a/users/plotting/colormaps/grayscale_02.hires.png and /dev/null differ diff --git a/users/plotting/colormaps/grayscale_02.pdf b/users/plotting/colormaps/grayscale_02.pdf deleted file mode 100644 index e803dc8f8a2..00000000000 Binary files a/users/plotting/colormaps/grayscale_02.pdf and /dev/null differ diff --git a/users/plotting/colormaps/grayscale_02.png b/users/plotting/colormaps/grayscale_02.png deleted file mode 100644 index 72a2a422905..00000000000 Binary files a/users/plotting/colormaps/grayscale_02.png and /dev/null differ diff --git a/users/plotting/colormaps/grayscale_03.hires.png b/users/plotting/colormaps/grayscale_03.hires.png deleted file mode 100644 index 1e4264cec79..00000000000 Binary files a/users/plotting/colormaps/grayscale_03.hires.png and /dev/null differ diff --git a/users/plotting/colormaps/grayscale_03.pdf b/users/plotting/colormaps/grayscale_03.pdf deleted file mode 100644 index e55e06c88b5..00000000000 Binary files a/users/plotting/colormaps/grayscale_03.pdf and /dev/null differ diff --git a/users/plotting/colormaps/grayscale_03.png b/users/plotting/colormaps/grayscale_03.png deleted file mode 100644 index 9d165518fa2..00000000000 Binary files a/users/plotting/colormaps/grayscale_03.png and /dev/null differ diff --git a/users/plotting/colormaps/grayscale_04.hires.png b/users/plotting/colormaps/grayscale_04.hires.png deleted file mode 100644 index d4007c1ab4a..00000000000 Binary files a/users/plotting/colormaps/grayscale_04.hires.png and /dev/null differ diff --git a/users/plotting/colormaps/grayscale_04.pdf b/users/plotting/colormaps/grayscale_04.pdf deleted file mode 100644 index fab249d9f10..00000000000 Binary files a/users/plotting/colormaps/grayscale_04.pdf and /dev/null differ diff --git a/users/plotting/colormaps/grayscale_04.png b/users/plotting/colormaps/grayscale_04.png deleted file mode 100644 index 29a4e271a3e..00000000000 Binary files a/users/plotting/colormaps/grayscale_04.png and /dev/null differ diff --git a/users/whats_new-1_00_00.hires.png b/users/whats_new-1_00_00.hires.png deleted file mode 100644 index 408f90ecf7a..00000000000 Binary files a/users/whats_new-1_00_00.hires.png and /dev/null differ diff --git a/users/whats_new-1_00_00.pdf b/users/whats_new-1_00_00.pdf deleted file mode 100644 index ae9638a3c8e..00000000000 Binary files a/users/whats_new-1_00_00.pdf and /dev/null differ diff --git a/users/whats_new-1_00_00.png b/users/whats_new-1_00_00.png deleted file mode 100644 index bd78724c175..00000000000 Binary files a/users/whats_new-1_00_00.png and /dev/null differ diff --git a/users/whats_new-1_01_00.hires.png b/users/whats_new-1_01_00.hires.png deleted file mode 100644 index b0df1a43d96..00000000000 Binary files a/users/whats_new-1_01_00.hires.png and /dev/null differ diff --git a/users/whats_new-1_01_00.pdf b/users/whats_new-1_01_00.pdf deleted file mode 100644 index 8d14fae5660..00000000000 Binary files a/users/whats_new-1_01_00.pdf and /dev/null differ diff --git a/users/whats_new-1_01_00.png b/users/whats_new-1_01_00.png deleted file mode 100644 index 4edd6ebc475..00000000000 Binary files a/users/whats_new-1_01_00.png and /dev/null differ diff --git a/users/whats_new-2_00_00.hires.png b/users/whats_new-2_00_00.hires.png deleted file mode 100644 index 82338232355..00000000000 Binary files a/users/whats_new-2_00_00.hires.png and /dev/null differ diff --git a/users/whats_new-2_00_00.pdf b/users/whats_new-2_00_00.pdf deleted file mode 100644 index d66753c638f..00000000000 Binary files a/users/whats_new-2_00_00.pdf and /dev/null differ diff --git a/users/whats_new-2_00_00.png b/users/whats_new-2_00_00.png deleted file mode 100644 index c4f7c3a1e1c..00000000000 Binary files a/users/whats_new-2_00_00.png and /dev/null differ diff --git a/users/whats_new-2_01_00.hires.png b/users/whats_new-2_01_00.hires.png deleted file mode 100644 index 33bf3808ba0..00000000000 Binary files a/users/whats_new-2_01_00.hires.png and /dev/null differ diff --git a/users/whats_new-2_01_00.pdf b/users/whats_new-2_01_00.pdf deleted file mode 100644 index f8be6026b13..00000000000 Binary files a/users/whats_new-2_01_00.pdf and /dev/null differ diff --git a/users/whats_new-2_01_00.png b/users/whats_new-2_01_00.png deleted file mode 100644 index c12bf3ce295..00000000000 Binary files a/users/whats_new-2_01_00.png and /dev/null differ