|
From: <jd...@us...> - 2008-05-16 19:48:10
|
Revision: 5151
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5151&view=rev
Author: jdh2358
Date: 2008-05-16 12:47:10 -0700 (Fri, 16 May 2008)
Log Message:
-----------
reorganized examples
Added Paths:
-----------
trunk/matplotlib/examples/animation/
trunk/matplotlib/examples/animation/animation_blit.py
trunk/matplotlib/examples/animation/animation_blit_fltk.py
trunk/matplotlib/examples/animation/animation_blit_qt.py
trunk/matplotlib/examples/animation/animation_blit_qt4.py
trunk/matplotlib/examples/animation/animation_blit_tk.py
trunk/matplotlib/examples/animation/animation_blit_wx.py
trunk/matplotlib/examples/animation/dynamic_collection.py
trunk/matplotlib/examples/animation/dynamic_demo_wx.py
trunk/matplotlib/examples/animation/dynamic_image_wxagg.py
trunk/matplotlib/examples/animation/dynamic_image_wxagg2.py
trunk/matplotlib/examples/event_handling/
trunk/matplotlib/examples/event_handling/lasso_demo.py
trunk/matplotlib/examples/event_handling/pick_event_demo.py
trunk/matplotlib/examples/event_handling/zoom_window.py
trunk/matplotlib/examples/misc/
trunk/matplotlib/examples/misc/font_indexing.py
trunk/matplotlib/examples/misc/ftface_props.py
trunk/matplotlib/examples/misc/rc_traits.py
trunk/matplotlib/examples/misc/rec_groupby_demo.py
trunk/matplotlib/examples/misc/rec_join_demo.py
trunk/matplotlib/examples/pylab/
trunk/matplotlib/examples/pylab/README
trunk/matplotlib/examples/pylab/__init__.py
trunk/matplotlib/examples/pylab/accented_text.py
trunk/matplotlib/examples/pylab/agg_buffer_to_array.py
trunk/matplotlib/examples/pylab/agg_oo.py
trunk/matplotlib/examples/pylab/alignment_test.py
trunk/matplotlib/examples/pylab/anim.py
trunk/matplotlib/examples/pylab/annotation_demo.py
trunk/matplotlib/examples/pylab/anscombe.py
trunk/matplotlib/examples/pylab/arctest.py
trunk/matplotlib/examples/pylab/arrow_demo.py
trunk/matplotlib/examples/pylab/auto_layout.py
trunk/matplotlib/examples/pylab/axes_demo.py
trunk/matplotlib/examples/pylab/axes_props.py
trunk/matplotlib/examples/pylab/axhspan_demo.py
trunk/matplotlib/examples/pylab/axis_equal_demo.py
trunk/matplotlib/examples/pylab/backend_driver.py
trunk/matplotlib/examples/pylab/bar_stacked.py
trunk/matplotlib/examples/pylab/barchart_demo.py
trunk/matplotlib/examples/pylab/barcode_demo.py
trunk/matplotlib/examples/pylab/barh_demo.py
trunk/matplotlib/examples/pylab/boxplot_demo.py
trunk/matplotlib/examples/pylab/break.py
trunk/matplotlib/examples/pylab/broken_barh.py
trunk/matplotlib/examples/pylab/clippedline.py
trunk/matplotlib/examples/pylab/cohere_demo.py
trunk/matplotlib/examples/pylab/color_by_yvalue.py
trunk/matplotlib/examples/pylab/color_demo.py
trunk/matplotlib/examples/pylab/colours.py
trunk/matplotlib/examples/pylab/contour_demo.py
trunk/matplotlib/examples/pylab/contour_image.py
trunk/matplotlib/examples/pylab/contourf_demo.py
trunk/matplotlib/examples/pylab/contourf_log.py
trunk/matplotlib/examples/pylab/coords_demo.py
trunk/matplotlib/examples/pylab/coords_report.py
trunk/matplotlib/examples/pylab/csd_demo.py
trunk/matplotlib/examples/pylab/cursor_demo.py
trunk/matplotlib/examples/pylab/custom_figure_class.py
trunk/matplotlib/examples/pylab/custom_projection_example.py
trunk/matplotlib/examples/pylab/custom_scale_example.py
trunk/matplotlib/examples/pylab/custom_ticker1.py
trunk/matplotlib/examples/pylab/customize_rc.py
trunk/matplotlib/examples/pylab/dannys_example.py
trunk/matplotlib/examples/pylab/dash_control.py
trunk/matplotlib/examples/pylab/dashpointlabel.py
trunk/matplotlib/examples/pylab/dashtick.py
trunk/matplotlib/examples/pylab/data_browser.py
trunk/matplotlib/examples/pylab/data_helper.py
trunk/matplotlib/examples/pylab/date_demo1.py
trunk/matplotlib/examples/pylab/date_demo2.py
trunk/matplotlib/examples/pylab/date_demo_convert.py
trunk/matplotlib/examples/pylab/date_demo_rrule.py
trunk/matplotlib/examples/pylab/date_index_formatter.py
trunk/matplotlib/examples/pylab/dynamic_demo.py
trunk/matplotlib/examples/pylab/dynamic_image_gtkagg.py
trunk/matplotlib/examples/pylab/ellipse_demo.py
trunk/matplotlib/examples/pylab/ellipse_rotated.py
trunk/matplotlib/examples/pylab/equal_aspect_ratio.py
trunk/matplotlib/examples/pylab/errorbar_demo.py
trunk/matplotlib/examples/pylab/errorbar_limits.py
trunk/matplotlib/examples/pylab/figimage_demo.py
trunk/matplotlib/examples/pylab/figlegend_demo.py
trunk/matplotlib/examples/pylab/figtext.py
trunk/matplotlib/examples/pylab/fill_between.py
trunk/matplotlib/examples/pylab/fill_between_posneg.py
trunk/matplotlib/examples/pylab/fill_demo.py
trunk/matplotlib/examples/pylab/fill_demo2.py
trunk/matplotlib/examples/pylab/fill_spiral.py
trunk/matplotlib/examples/pylab/finance_demo.py
trunk/matplotlib/examples/pylab/font_table_ttf.py
trunk/matplotlib/examples/pylab/fonts_demo.py
trunk/matplotlib/examples/pylab/fonts_demo_kw.py
trunk/matplotlib/examples/pylab/ganged_plots.py
trunk/matplotlib/examples/pylab/geo_demo.py
trunk/matplotlib/examples/pylab/ginput_demo.py
trunk/matplotlib/examples/pylab/gradient_bar.py
trunk/matplotlib/examples/pylab/hatch_demo.py
trunk/matplotlib/examples/pylab/hexbin_demo.py
trunk/matplotlib/examples/pylab/hist_colormapped.py
trunk/matplotlib/examples/pylab/histogram_demo.py
trunk/matplotlib/examples/pylab/hline_demo.py
trunk/matplotlib/examples/pylab/image_demo.py
trunk/matplotlib/examples/pylab/image_demo2.py
trunk/matplotlib/examples/pylab/image_demo3.py
trunk/matplotlib/examples/pylab/image_interp.py
trunk/matplotlib/examples/pylab/image_masked.py
trunk/matplotlib/examples/pylab/image_origin.py
trunk/matplotlib/examples/pylab/image_slices_viewer.py
trunk/matplotlib/examples/pylab/integral_demo.py
trunk/matplotlib/examples/pylab/interactive.py
trunk/matplotlib/examples/pylab/interactive2.py
trunk/matplotlib/examples/pylab/interp_demo.py
trunk/matplotlib/examples/pylab/invert_axes.py
trunk/matplotlib/examples/pylab/keypress_demo.py
trunk/matplotlib/examples/pylab/layer_images.py
trunk/matplotlib/examples/pylab/legend_auto.py
trunk/matplotlib/examples/pylab/legend_demo.py
trunk/matplotlib/examples/pylab/legend_demo2.py
trunk/matplotlib/examples/pylab/legend_scatter.py
trunk/matplotlib/examples/pylab/line_collection.py
trunk/matplotlib/examples/pylab/line_collection2.py
trunk/matplotlib/examples/pylab/line_styles.py
trunk/matplotlib/examples/pylab/lineprops_dialog_gtk.py
trunk/matplotlib/examples/pylab/load_converter.py
trunk/matplotlib/examples/pylab/loadrec.py
trunk/matplotlib/examples/pylab/log_bar.py
trunk/matplotlib/examples/pylab/log_demo.py
trunk/matplotlib/examples/pylab/log_test.py
trunk/matplotlib/examples/pylab/logo.py
trunk/matplotlib/examples/pylab/major_minor_demo1.py
trunk/matplotlib/examples/pylab/major_minor_demo2.py
trunk/matplotlib/examples/pylab/manual_axis.py
trunk/matplotlib/examples/pylab/masked_demo.py
trunk/matplotlib/examples/pylab/mathtext_demo.py
trunk/matplotlib/examples/pylab/mathtext_examples.py
trunk/matplotlib/examples/pylab/matplotlib_icon.py
trunk/matplotlib/examples/pylab/matshow.py
trunk/matplotlib/examples/pylab/movie_demo.py
trunk/matplotlib/examples/pylab/mri_demo.py
trunk/matplotlib/examples/pylab/mri_with_eeg.py
trunk/matplotlib/examples/pylab/multi_image.py
trunk/matplotlib/examples/pylab/multiline.py
trunk/matplotlib/examples/pylab/multiple_figs_demo.py
trunk/matplotlib/examples/pylab/nan_test.py
trunk/matplotlib/examples/pylab/newscalarformatter_demo.py
trunk/matplotlib/examples/pylab/pcolor_demo.py
trunk/matplotlib/examples/pylab/pcolor_demo2.py
trunk/matplotlib/examples/pylab/pcolor_log.py
trunk/matplotlib/examples/pylab/pcolor_nonuniform.py
trunk/matplotlib/examples/pylab/pcolor_small.py
trunk/matplotlib/examples/pylab/pick_event_demo2.py
trunk/matplotlib/examples/pylab/pie_demo.py
trunk/matplotlib/examples/pylab/plotfile_demo.py
trunk/matplotlib/examples/pylab/polar_bar.py
trunk/matplotlib/examples/pylab/polar_demo.py
trunk/matplotlib/examples/pylab/polar_legend.py
trunk/matplotlib/examples/pylab/polar_scatter.py
trunk/matplotlib/examples/pylab/poly_editor.py
trunk/matplotlib/examples/pylab/poormans_contour.py
trunk/matplotlib/examples/pylab/print_stdout.py
trunk/matplotlib/examples/pylab/psd_demo.py
trunk/matplotlib/examples/pylab/pstest.py
trunk/matplotlib/examples/pylab/pylab_with_gtk.py
trunk/matplotlib/examples/pylab/pythonic_matplotlib.py
trunk/matplotlib/examples/pylab/quadmesh_demo.py
trunk/matplotlib/examples/pylab/quiver_demo.py
trunk/matplotlib/examples/pylab/scatter_custom_symbol.py
trunk/matplotlib/examples/pylab/scatter_demo.py
trunk/matplotlib/examples/pylab/scatter_demo2.py
trunk/matplotlib/examples/pylab/scatter_masked.py
trunk/matplotlib/examples/pylab/scatter_profile.py
trunk/matplotlib/examples/pylab/scatter_star_poly.py
trunk/matplotlib/examples/pylab/set_and_get.py
trunk/matplotlib/examples/pylab/shared_axis_across_figures.py
trunk/matplotlib/examples/pylab/shared_axis_demo.py
trunk/matplotlib/examples/pylab/simple3d.py
trunk/matplotlib/examples/pylab/simple_plot.py
trunk/matplotlib/examples/pylab/simple_plot_fps.py
trunk/matplotlib/examples/pylab/specgram_demo.py
trunk/matplotlib/examples/pylab/spy_demos.py
trunk/matplotlib/examples/pylab/stem_plot.py
trunk/matplotlib/examples/pylab/step_demo.py
trunk/matplotlib/examples/pylab/stix_fonts_demo.py
trunk/matplotlib/examples/pylab/stock_demo.py
trunk/matplotlib/examples/pylab/strip_chart_demo.py
trunk/matplotlib/examples/pylab/subplot_demo.py
trunk/matplotlib/examples/pylab/subplot_toolbar.py
trunk/matplotlib/examples/pylab/subplots_adjust.py
trunk/matplotlib/examples/pylab/symlog_demo.py
trunk/matplotlib/examples/pylab/system_monitor.py
trunk/matplotlib/examples/pylab/table_demo.py
trunk/matplotlib/examples/pylab/tex_demo.py
trunk/matplotlib/examples/pylab/tex_unicode_demo.py
trunk/matplotlib/examples/pylab/text_handles.py
trunk/matplotlib/examples/pylab/text_rotation.py
trunk/matplotlib/examples/pylab/text_themes.py
trunk/matplotlib/examples/pylab/to_numeric.py
trunk/matplotlib/examples/pylab/toggle_images.py
trunk/matplotlib/examples/pylab/transoffset.py
trunk/matplotlib/examples/pylab/two_scales.py
trunk/matplotlib/examples/pylab/unicode_demo.py
trunk/matplotlib/examples/pylab/vertical_ticklabels.py
trunk/matplotlib/examples/pylab/vline_demo.py
trunk/matplotlib/examples/pylab/webapp_demo.py
trunk/matplotlib/examples/pylab/xcorr_demo.py
trunk/matplotlib/examples/pylab/zorder_demo.py
trunk/matplotlib/examples/pyplot/
trunk/matplotlib/examples/pyplot/barchart_demo.py
trunk/matplotlib/examples/pyplot/collections_demo.py
trunk/matplotlib/examples/pyplot/colorbar_only.py
trunk/matplotlib/examples/pyplot/date_demo.py
trunk/matplotlib/examples/pyplot/scatter_piecharts.py
trunk/matplotlib/examples/tests/
trunk/matplotlib/examples/user_interfaces/
trunk/matplotlib/examples/user_interfaces/README.wx
trunk/matplotlib/examples/user_interfaces/embedding_in_gtk.py
trunk/matplotlib/examples/user_interfaces/embedding_in_gtk2.py
trunk/matplotlib/examples/user_interfaces/embedding_in_gtk3.py
trunk/matplotlib/examples/user_interfaces/embedding_in_qt.py
trunk/matplotlib/examples/user_interfaces/embedding_in_qt4.py
trunk/matplotlib/examples/user_interfaces/embedding_in_tk.py
trunk/matplotlib/examples/user_interfaces/embedding_in_tk2.py
trunk/matplotlib/examples/user_interfaces/embedding_in_wx.py
trunk/matplotlib/examples/user_interfaces/embedding_in_wx2.py
trunk/matplotlib/examples/user_interfaces/embedding_in_wx3.py
trunk/matplotlib/examples/user_interfaces/embedding_in_wx4.py
trunk/matplotlib/examples/user_interfaces/gtk_spreadsheet.py
trunk/matplotlib/examples/user_interfaces/histogram_demo_canvasagg.py
trunk/matplotlib/examples/user_interfaces/mathtext_wx.py
trunk/matplotlib/examples/user_interfaces/mpl_with_glade.glade
trunk/matplotlib/examples/user_interfaces/mpl_with_glade.py
trunk/matplotlib/examples/user_interfaces/printing_in_wx.py
trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_custom.py
trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_simple.py
trunk/matplotlib/examples/user_interfaces/simple3d_oo.py
trunk/matplotlib/examples/user_interfaces/wxcursor_demo.py
Removed Paths:
-------------
trunk/matplotlib/examples/README
trunk/matplotlib/examples/README.wx
trunk/matplotlib/examples/__init__.py
trunk/matplotlib/examples/accented_text.py
trunk/matplotlib/examples/agg_buffer_to_array.py
trunk/matplotlib/examples/agg_oo.py
trunk/matplotlib/examples/alignment_test.py
trunk/matplotlib/examples/anim.py
trunk/matplotlib/examples/animation_blit.py
trunk/matplotlib/examples/animation_blit_fltk.py
trunk/matplotlib/examples/animation_blit_qt.py
trunk/matplotlib/examples/animation_blit_qt4.py
trunk/matplotlib/examples/animation_blit_tk.py
trunk/matplotlib/examples/animation_blit_wx.py
trunk/matplotlib/examples/annotation_demo.py
trunk/matplotlib/examples/anscombe.py
trunk/matplotlib/examples/arctest.py
trunk/matplotlib/examples/arrow_demo.py
trunk/matplotlib/examples/auto_layout.py
trunk/matplotlib/examples/axes_demo.py
trunk/matplotlib/examples/axes_props.py
trunk/matplotlib/examples/axhspan_demo.py
trunk/matplotlib/examples/axis_equal_demo.py
trunk/matplotlib/examples/backend_driver.py
trunk/matplotlib/examples/bar_stacked.py
trunk/matplotlib/examples/barchart_demo.py
trunk/matplotlib/examples/barcode_demo.py
trunk/matplotlib/examples/barh_demo.py
trunk/matplotlib/examples/boxplot_demo.py
trunk/matplotlib/examples/break.py
trunk/matplotlib/examples/broken_barh.py
trunk/matplotlib/examples/clippedline.py
trunk/matplotlib/examples/cohere_demo.py
trunk/matplotlib/examples/collections_demo.py
trunk/matplotlib/examples/color_by_yvalue.py
trunk/matplotlib/examples/color_demo.py
trunk/matplotlib/examples/colorbar_only.py
trunk/matplotlib/examples/colours.py
trunk/matplotlib/examples/contour_demo.py
trunk/matplotlib/examples/contour_image.py
trunk/matplotlib/examples/contourf_demo.py
trunk/matplotlib/examples/contourf_log.py
trunk/matplotlib/examples/coords_demo.py
trunk/matplotlib/examples/coords_report.py
trunk/matplotlib/examples/csd_demo.py
trunk/matplotlib/examples/cursor_demo.py
trunk/matplotlib/examples/custom_figure_class.py
trunk/matplotlib/examples/custom_projection_example.py
trunk/matplotlib/examples/custom_scale_example.py
trunk/matplotlib/examples/custom_ticker1.py
trunk/matplotlib/examples/customize_rc.py
trunk/matplotlib/examples/dannys_example.py
trunk/matplotlib/examples/dash_control.py
trunk/matplotlib/examples/dashpointlabel.py
trunk/matplotlib/examples/dashtick.py
trunk/matplotlib/examples/data_browser.py
trunk/matplotlib/examples/data_helper.py
trunk/matplotlib/examples/date_demo.py
trunk/matplotlib/examples/date_demo1.py
trunk/matplotlib/examples/date_demo2.py
trunk/matplotlib/examples/date_demo_convert.py
trunk/matplotlib/examples/date_demo_rrule.py
trunk/matplotlib/examples/date_index_formatter.py
trunk/matplotlib/examples/dynamic_collection.py
trunk/matplotlib/examples/dynamic_demo.py
trunk/matplotlib/examples/dynamic_demo_wx.py
trunk/matplotlib/examples/dynamic_image_gtkagg.py
trunk/matplotlib/examples/dynamic_image_wxagg.py
trunk/matplotlib/examples/dynamic_image_wxagg2.py
trunk/matplotlib/examples/ellipse_demo.py
trunk/matplotlib/examples/ellipse_rotated.py
trunk/matplotlib/examples/embedding_in_gtk.py
trunk/matplotlib/examples/embedding_in_gtk2.py
trunk/matplotlib/examples/embedding_in_gtk3.py
trunk/matplotlib/examples/embedding_in_qt.py
trunk/matplotlib/examples/embedding_in_qt4.py
trunk/matplotlib/examples/embedding_in_tk.py
trunk/matplotlib/examples/embedding_in_tk2.py
trunk/matplotlib/examples/embedding_in_wx.py
trunk/matplotlib/examples/embedding_in_wx2.py
trunk/matplotlib/examples/embedding_in_wx3.py
trunk/matplotlib/examples/embedding_in_wx4.py
trunk/matplotlib/examples/equal_aspect_ratio.py
trunk/matplotlib/examples/errorbar_demo.py
trunk/matplotlib/examples/errorbar_limits.py
trunk/matplotlib/examples/figimage_demo.py
trunk/matplotlib/examples/figlegend_demo.py
trunk/matplotlib/examples/figtext.py
trunk/matplotlib/examples/fill_between.py
trunk/matplotlib/examples/fill_between_posneg.py
trunk/matplotlib/examples/fill_demo.py
trunk/matplotlib/examples/fill_demo2.py
trunk/matplotlib/examples/fill_spiral.py
trunk/matplotlib/examples/finance_demo.py
trunk/matplotlib/examples/font_indexing.py
trunk/matplotlib/examples/font_table_ttf.py
trunk/matplotlib/examples/fonts_demo.py
trunk/matplotlib/examples/fonts_demo_kw.py
trunk/matplotlib/examples/ftface_props.py
trunk/matplotlib/examples/ganged_plots.py
trunk/matplotlib/examples/geo_demo.py
trunk/matplotlib/examples/ginput_demo.py
trunk/matplotlib/examples/gradient_bar.py
trunk/matplotlib/examples/gtk_spreadsheet.py
trunk/matplotlib/examples/hatch_demo.py
trunk/matplotlib/examples/hexbin_demo.py
trunk/matplotlib/examples/hist_colormapped.py
trunk/matplotlib/examples/histogram_demo.py
trunk/matplotlib/examples/histogram_demo_canvasagg.py
trunk/matplotlib/examples/hline_demo.py
trunk/matplotlib/examples/image_demo.py
trunk/matplotlib/examples/image_demo2.py
trunk/matplotlib/examples/image_demo3.py
trunk/matplotlib/examples/image_interp.py
trunk/matplotlib/examples/image_masked.py
trunk/matplotlib/examples/image_origin.py
trunk/matplotlib/examples/image_slices_viewer.py
trunk/matplotlib/examples/integral_demo.py
trunk/matplotlib/examples/interactive.py
trunk/matplotlib/examples/interactive2.py
trunk/matplotlib/examples/interp_demo.py
trunk/matplotlib/examples/invert_axes.py
trunk/matplotlib/examples/keypress_demo.py
trunk/matplotlib/examples/lasso_demo.py
trunk/matplotlib/examples/layer_images.py
trunk/matplotlib/examples/legend_auto.py
trunk/matplotlib/examples/legend_demo.py
trunk/matplotlib/examples/legend_demo2.py
trunk/matplotlib/examples/legend_scatter.py
trunk/matplotlib/examples/line_collection.py
trunk/matplotlib/examples/line_collection2.py
trunk/matplotlib/examples/line_styles.py
trunk/matplotlib/examples/lineprops_dialog_gtk.py
trunk/matplotlib/examples/load_converter.py
trunk/matplotlib/examples/loadrec.py
trunk/matplotlib/examples/log_bar.py
trunk/matplotlib/examples/log_demo.py
trunk/matplotlib/examples/log_test.py
trunk/matplotlib/examples/logo.py
trunk/matplotlib/examples/major_minor_demo1.py
trunk/matplotlib/examples/major_minor_demo2.py
trunk/matplotlib/examples/manual_axis.py
trunk/matplotlib/examples/masked_demo.py
trunk/matplotlib/examples/mathtext_demo.py
trunk/matplotlib/examples/mathtext_examples.py
trunk/matplotlib/examples/mathtext_wx.py
trunk/matplotlib/examples/matplotlib_icon.py
trunk/matplotlib/examples/matshow.py
trunk/matplotlib/examples/movie_demo.py
trunk/matplotlib/examples/mpl_with_glade.glade
trunk/matplotlib/examples/mpl_with_glade.py
trunk/matplotlib/examples/mri_demo.py
trunk/matplotlib/examples/mri_with_eeg.py
trunk/matplotlib/examples/multi_image.py
trunk/matplotlib/examples/multiline.py
trunk/matplotlib/examples/multiple_figs_demo.py
trunk/matplotlib/examples/nan_test.py
trunk/matplotlib/examples/newscalarformatter_demo.py
trunk/matplotlib/examples/pcolor_demo.py
trunk/matplotlib/examples/pcolor_demo2.py
trunk/matplotlib/examples/pcolor_log.py
trunk/matplotlib/examples/pcolor_nonuniform.py
trunk/matplotlib/examples/pcolor_small.py
trunk/matplotlib/examples/pick_event_demo.py
trunk/matplotlib/examples/pick_event_demo2.py
trunk/matplotlib/examples/pie_demo.py
trunk/matplotlib/examples/plotfile_demo.py
trunk/matplotlib/examples/polar_bar.py
trunk/matplotlib/examples/polar_demo.py
trunk/matplotlib/examples/polar_legend.py
trunk/matplotlib/examples/polar_scatter.py
trunk/matplotlib/examples/poly_editor.py
trunk/matplotlib/examples/poormans_contour.py
trunk/matplotlib/examples/print_stdout.py
trunk/matplotlib/examples/printing_in_wx.py
trunk/matplotlib/examples/psd_demo.py
trunk/matplotlib/examples/pstest.py
trunk/matplotlib/examples/pylab_with_gtk.py
trunk/matplotlib/examples/pythonic_matplotlib.py
trunk/matplotlib/examples/quadmesh_demo.py
trunk/matplotlib/examples/quiver_demo.py
trunk/matplotlib/examples/rc_traits.py
trunk/matplotlib/examples/rec_edit_gtk_custom.py
trunk/matplotlib/examples/rec_edit_gtk_simple.py
trunk/matplotlib/examples/rec_groupby_demo.py
trunk/matplotlib/examples/rec_join_demo.py
trunk/matplotlib/examples/scatter_custom_symbol.py
trunk/matplotlib/examples/scatter_demo.py
trunk/matplotlib/examples/scatter_demo2.py
trunk/matplotlib/examples/scatter_masked.py
trunk/matplotlib/examples/scatter_piecharts.py
trunk/matplotlib/examples/scatter_profile.py
trunk/matplotlib/examples/scatter_star_poly.py
trunk/matplotlib/examples/set_and_get.py
trunk/matplotlib/examples/shared_axis_across_figures.py
trunk/matplotlib/examples/shared_axis_demo.py
trunk/matplotlib/examples/simple3d.py
trunk/matplotlib/examples/simple3d_oo.py
trunk/matplotlib/examples/simple_plot.py
trunk/matplotlib/examples/simple_plot_fps.py
trunk/matplotlib/examples/specgram_demo.py
trunk/matplotlib/examples/spy_demos.py
trunk/matplotlib/examples/stem_plot.py
trunk/matplotlib/examples/step_demo.py
trunk/matplotlib/examples/stix_fonts_demo.py
trunk/matplotlib/examples/stock_demo.py
trunk/matplotlib/examples/strip_chart_demo.py
trunk/matplotlib/examples/subplot_demo.py
trunk/matplotlib/examples/subplot_toolbar.py
trunk/matplotlib/examples/subplots_adjust.py
trunk/matplotlib/examples/symlog_demo.py
trunk/matplotlib/examples/system_monitor.py
trunk/matplotlib/examples/table_demo.py
trunk/matplotlib/examples/tex_demo.py
trunk/matplotlib/examples/tex_unicode_demo.py
trunk/matplotlib/examples/text_handles.py
trunk/matplotlib/examples/text_rotation.py
trunk/matplotlib/examples/text_themes.py
trunk/matplotlib/examples/to_numeric.py
trunk/matplotlib/examples/toggle_images.py
trunk/matplotlib/examples/transoffset.py
trunk/matplotlib/examples/two_scales.py
trunk/matplotlib/examples/unicode_demo.py
trunk/matplotlib/examples/vertical_ticklabels.py
trunk/matplotlib/examples/vline_demo.py
trunk/matplotlib/examples/webapp_demo.py
trunk/matplotlib/examples/wxcursor_demo.py
trunk/matplotlib/examples/xcorr_demo.py
trunk/matplotlib/examples/zoom_window.py
trunk/matplotlib/examples/zorder_demo.py
Deleted: trunk/matplotlib/examples/README
===================================================================
--- trunk/matplotlib/examples/README 2008-05-16 19:20:04 UTC (rev 5150)
+++ trunk/matplotlib/examples/README 2008-05-16 19:47:10 UTC (rev 5151)
@@ -1,24 +0,0 @@
-Here are some demos of how to use the matplotlib.
-
-
--- data_helper.py - a convenience module to load some data from the
- data dir
-
--- embedding_in_gtk - The Figure class derives from gtk.DrawingArea,
- so it is easy to embed in larger applications.
-
--- histograms_gauss.py - 2D histograms; requires the jdh.mlab module
-
--- simple_plot.py - the basic 2D line plot
-
--- subplot_demo.py - how to do multiple axes on a single plot
-
--- vline_demo.py - working with straight lines
-
--- stock_demo.py - working with large datasets. Click on the plot and
- launch the navigation tool; wheel mouse over the navigation
- buttons to scroll and zoom. There are 58 days of minute by
- minute stock quotes for two tickers. The plot lib uses
- Numeric's super speedy searchsorted routine to extract the
- clipping indices so only the data in the viewport are handled.
-
Deleted: trunk/matplotlib/examples/README.wx
===================================================================
--- trunk/matplotlib/examples/README.wx 2008-05-16 19:20:04 UTC (rev 5150)
+++ trunk/matplotlib/examples/README.wx 2008-05-16 19:47:10 UTC (rev 5151)
@@ -1,21 +0,0 @@
-You have a few different options available to you for embedding
-matplotlib in a wxPython application
-
-1. Embed one of the wxPython backend widgets (which subclass wx.Panel)
- directly and draw plots on it using matplotlib's object-oriented
- API. This approach is demonstrated by some of the examples
- embedding_in_wx*.py
-
-2. Embed the PlotPanel from Matt Newville's `MPlot' package and draw
- plots on it using its plot() and oplot() methods.
-
- http://cars9.uchicago.edu/~newville/Python/MPlot/
-
-3. Embed the PlotPanel from Ken McIvor wxmpl module and draw plots on
- it using the matplotlib's object-oriented API.
-
- http://agni.phys.iit.edu/~kmcivor/wxmpl/
-
-Each of these approachs has different benefits and drawbacks, so I
-encourage you to evaluate each of them and select the one that best
-meets your needs.
Deleted: trunk/matplotlib/examples/__init__.py
===================================================================
Deleted: trunk/matplotlib/examples/accented_text.py
===================================================================
--- trunk/matplotlib/examples/accented_text.py 2008-05-16 19:20:04 UTC (rev 5150)
+++ trunk/matplotlib/examples/accented_text.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -1,21 +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 *
-
-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()
Deleted: trunk/matplotlib/examples/agg_buffer_to_array.py
===================================================================
--- trunk/matplotlib/examples/agg_buffer_to_array.py 2008-05-16 19:20:04 UTC (rev 5150)
+++ trunk/matplotlib/examples/agg_buffer_to_array.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -1,24 +0,0 @@
-import matplotlib
-matplotlib.use('Agg')
-from pylab import figure, show
-import numpy as npy
-
-# 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 = npy.fromstring(buf, npy.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)
-fig2.savefig('simple.png')
-show()
Deleted: trunk/matplotlib/examples/agg_oo.py
===================================================================
--- trunk/matplotlib/examples/agg_oo.py 2008-05-16 19:20:04 UTC (rev 5150)
+++ trunk/matplotlib/examples/agg_oo.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -1,16 +0,0 @@
-#!/usr/bin/env python
-"""
-A pure OO (look Ma, no pylab!) example using the agg backend
-"""
-from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
-from matplotlib.figure import Figure
-
-fig = Figure()
-canvas = FigureCanvas(fig)
-ax = fig.add_subplot(111)
-ax.plot([1,2,3])
-ax.set_title('hi mom')
-ax.grid(True)
-ax.set_xlabel('time')
-ax.set_ylabel('volts')
-canvas.print_figure('test')
Deleted: trunk/matplotlib/examples/alignment_test.py
===================================================================
--- trunk/matplotlib/examples/alignment_test.py 2008-05-16 19:20:04 UTC (rev 5150)
+++ trunk/matplotlib/examples/alignment_test.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -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')
-#savefig('alignment_test', dpi=100)
-show()
Deleted: trunk/matplotlib/examples/anim.py
===================================================================
--- trunk/matplotlib/examples/anim.py 2008-05-16 19:20:04 UTC (rev 5150)
+++ trunk/matplotlib/examples/anim.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -1,32 +0,0 @@
-#!/usr/bin/env python
-"""
-A simple example of an animated plot in matplotlib. You can test the
-speed of animation of various backends by running the script with the
-'-dSomeBackend' flag
-
-SC Aug 31 2005 mpl 0.83.2:
-Here are some numbers from my system, where FPS is the frames rendered
-per second
-
- GTK 29 FPS
- GTKAgg 18 FPS
- GTKCairo 15 FPS
- TkAgg 13 FPS
- QkAgg 13 FPS
-"""
-import time
-
-import pylab as p
-
-# turn interactive mode on for dynamic updates. If you aren't in
-# interactive mode, you'll need to use a GUI event handler/timer.
-p.ion()
-
-tstart = time.time() # for profiling
-x = p.arange(0, 2*p.pi, 0.01) # x-array
-line, = p.plot(x, p.sin(x))
-for i in p.arange(1,200):
- line.set_ydata(p.sin(x+i/10.0)) # update the data
- p.draw() # redraw the canvas
-
-print 'FPS:' , 200/(time.time()-tstart)
Copied: trunk/matplotlib/examples/animation/animation_blit.py (from rev 5143, trunk/matplotlib/examples/animation_blit.py)
===================================================================
--- trunk/matplotlib/examples/animation/animation_blit.py (rev 0)
+++ trunk/matplotlib/examples/animation/animation_blit.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+
+# For detailed comments on animation and the techniques used here, see
+# the wiki entry
+# http://www.scipy.org/wikis/topical_software/MatplotlibAnimation
+import sys
+import time
+
+import gtk, gobject
+
+import matplotlib
+matplotlib.use('GTKAgg')
+import numpy as npy
+import pylab as p
+
+
+ax = p.subplot(111)
+canvas = ax.figure.canvas
+
+p.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
+p.grid() # to ensure proper background restore
+
+# create the initial line
+x = npy.arange(0,2*npy.pi,0.01)
+line, = p.plot(x, npy.sin(x), animated=True, lw=2)
+
+# for profiling
+tstart = time.time()
+
+def update_line(*args):
+ 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
+ try:
+ ax.draw_artist(line)
+ except AssertionError:
+ return
+ # 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)
+ sys.exit()
+
+ update_line.cnt += 1
+ return True
+
+update_line.cnt = 0
+update_line.background = None
+gobject.idle_add(update_line)
+p.show()
Copied: trunk/matplotlib/examples/animation/animation_blit_fltk.py (from rev 5143, trunk/matplotlib/examples/animation_blit_fltk.py)
===================================================================
--- trunk/matplotlib/examples/animation/animation_blit_fltk.py (rev 0)
+++ trunk/matplotlib/examples/animation/animation_blit_fltk.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -0,0 +1,54 @@
+import sys
+import fltk
+import matplotlib
+matplotlib.use('FltkAgg')
+import pylab as p
+import numpy as npy
+import time
+
+
+# save the clean slate background -- everything but the animated line
+# is drawn and saved in the pixel buffer background
+class animator:
+ def __init__(self,ax):
+ self.ax=ax
+ self.canvas=ax.figure.canvas
+ self.canvas.mpl_connect('draw_event',self.clear)
+ self.cnt=0
+ self.background=None
+
+ # for profiling
+ self.tstart = time.time()
+
+ def clear(self,event):
+ self.background = self.canvas.copy_from_bbox(self.ax.bbox)
+
+ def update(self,ptr):
+ # restore the clean slate background
+ if self.background is None:
+ self.background = self.canvas.copy_from_bbox(self.ax.bbox)
+ self.canvas.restore_region(self.background)
+ # update the data
+ line.set_ydata(npy.sin(x+self.cnt/10.0))
+ # just draw the animated artist
+ self.ax.draw_artist(line)
+ # just redraw the axes rectangle
+ self.canvas.blit(ax.bbox)
+ self.cnt+=1
+ if self.cnt==1000:
+ # print the timing info and quit
+ print 'FPS:' , 1000/(time.time()-self.tstart)
+ sys.exit()
+ return True
+
+ax = p.subplot(111)
+p.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
+p.grid() # to ensure proper background restore
+# create the initial line
+x = npy.arange(0,2*npy.pi,0.01)
+line, = p.plot(x, npy.sin(x), animated=True)
+p.draw()
+anim=animator(ax)
+
+fltk.Fl.add_idle(anim.update)
+fltk.Fl.run()
Copied: trunk/matplotlib/examples/animation/animation_blit_qt.py (from rev 5143, trunk/matplotlib/examples/animation_blit_qt.py)
===================================================================
--- trunk/matplotlib/examples/animation/animation_blit_qt.py (rev 0)
+++ trunk/matplotlib/examples/animation/animation_blit_qt.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -0,0 +1,64 @@
+# For detailed comments on animation and the techniqes used here, see
+# the wiki entry http://www.scipy.org/Cookbook/Matplotlib/Animations
+
+import os, sys
+import matplotlib
+matplotlib.use('QtAgg') # qt3 example
+
+from qt import *
+# Note: color-intensive applications may require a different color allocation
+# strategy.
+QApplication.setColorSpec(QApplication.NormalColor)
+
+TRUE = 1
+FALSE = 0
+ITERS = 1000
+
+import pylab as p
+import numpy as npy
+import time
+
+class BlitQT(QObject):
+ def __init__(self):
+ QObject.__init__(self, None, "app")
+
+ self.ax = p.subplot(111)
+ self.canvas = self.ax.figure.canvas
+ self.cnt = 0
+
+ # create the initial line
+ self.x = npy.arange(0,2*npy.pi,0.01)
+ self.line, = p.plot(self.x, npy.sin(self.x), animated=True, lw=2)
+
+ self.background = None
+
+ def timerEvent(self, evt):
+ if self.background is None:
+ self.background = self.canvas.copy_from_bbox(self.ax.bbox)
+
+ # restore the clean slate background
+ self.canvas.restore_region(self.background)
+ # update the data
+ self.line.set_ydata(npy.sin(self.x+self.cnt/10.0))
+ # just draw the animated artist
+ self.ax.draw_artist(self.line)
+ # just redraw the axes rectangle
+ self.canvas.blit(self.ax.bbox)
+
+ if self.cnt==ITERS:
+ # print the timing info and quit
+ print 'FPS:' , ITERS/(time.time()-self.tstart)
+ sys.exit()
+
+ else:
+ self.cnt += 1
+
+p.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
+p.grid() # to ensure proper background restore
+
+app = BlitQT()
+# for profiling
+app.tstart = time.time()
+app.startTimer(0)
+
+p.show()
Copied: trunk/matplotlib/examples/animation/animation_blit_qt4.py (from rev 5143, trunk/matplotlib/examples/animation_blit_qt4.py)
===================================================================
--- trunk/matplotlib/examples/animation/animation_blit_qt4.py (rev 0)
+++ trunk/matplotlib/examples/animation/animation_blit_qt4.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -0,0 +1,68 @@
+# For detailed comments on animation and the techniqes used here, see
+# the wiki entry http://www.scipy.org/Cookbook/Matplotlib/Animations
+
+import os, sys
+import matplotlib
+matplotlib.use('Qt4Agg') # qt4 example
+
+from PyQt4 import QtCore, QtGui
+
+ITERS = 1000
+
+import pylab as p
+import numpy as npy
+import time
+
+class BlitQT(QtCore.QObject):
+ def __init__(self):
+ self.ax = p.subplot(111)
+ self.canvas = self.ax.figure.canvas
+
+ # By making this a child of the canvas we make sure that it is
+ # destroyed first and avoids a possible exception when the user clicks
+ # on the window's close box.
+ QtCore.QObject.__init__(self, self.canvas)
+
+ self.cnt = 0
+
+ # create the initial line
+ self.x = npy.arange(0,2*npy.pi,0.01)
+ self.line, = p.plot(self.x, npy.sin(self.x), animated=True, lw=2)
+
+ self.background = None
+ self.old_size = 0, 0
+
+ def timerEvent(self, evt):
+ # See if the size has changed since last time round.
+ current_size = self.ax.bbox.width, self.ax.bbox.height
+
+ if self.old_size != current_size:
+ self.old_size = current_size
+ self.background = self.canvas.copy_from_bbox(self.ax.bbox)
+
+ # restore the clean slate background
+ self.canvas.restore_region(self.background)
+ # update the data
+ self.line.set_ydata(npy.sin(self.x+self.cnt/10.0))
+ # just draw the animated artist
+ self.ax.draw_artist(self.line)
+ # just redraw the axes rectangle
+ self.canvas.blit(self.ax.bbox)
+
+ if self.cnt==ITERS:
+ # print the timing info and quit
+ print 'FPS:' , ITERS/(time.time()-self.tstart)
+ sys.exit()
+
+ else:
+ self.cnt += 1
+
+p.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
+p.grid() # to ensure proper background restore
+
+app = BlitQT()
+# for profiling
+app.tstart = time.time()
+app.startTimer(0)
+
+p.show()
Copied: trunk/matplotlib/examples/animation/animation_blit_tk.py (from rev 5143, trunk/matplotlib/examples/animation_blit_tk.py)
===================================================================
--- trunk/matplotlib/examples/animation/animation_blit_tk.py (rev 0)
+++ trunk/matplotlib/examples/animation/animation_blit_tk.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -0,0 +1,52 @@
+# For detailed comments on animation and the techniqes used here, see
+# the wiki entry http://www.scipy.org/Cookbook/Matplotlib/Animations
+
+import matplotlib
+matplotlib.use('TkAgg')
+
+import sys
+import pylab as p
+import numpy as npy
+import time
+
+ax = p.subplot(111)
+canvas = ax.figure.canvas
+
+
+# create the initial line
+x = npy.arange(0,2*npy.pi,0.01)
+line, = p.plot(x, npy.sin(x), animated=True, lw=2)
+
+def run(*args):
+ background = canvas.copy_from_bbox(ax.bbox)
+ # for profiling
+ tstart = time.time()
+
+ while 1:
+ # restore the clean slate background
+ canvas.restore_region(background)
+ # update the data
+ line.set_ydata(npy.sin(x+run.cnt/10.0))
+ # just draw the animated artist
+ ax.draw_artist(line)
+ # just redraw the axes rectangle
+ canvas.blit(ax.bbox)
+
+ if run.cnt==1000:
+ # print the timing info and quit
+ print 'FPS:' , 1000/(time.time()-tstart)
+ sys.exit()
+
+ run.cnt += 1
+run.cnt = 0
+
+
+p.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
+p.grid() # to ensure proper background restore
+manager = p.get_current_fig_manager()
+manager.window.after(100, run)
+
+p.show()
+
+
+
Copied: trunk/matplotlib/examples/animation/animation_blit_wx.py (from rev 5143, trunk/matplotlib/examples/animation_blit_wx.py)
===================================================================
--- trunk/matplotlib/examples/animation/animation_blit_wx.py (rev 0)
+++ trunk/matplotlib/examples/animation/animation_blit_wx.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -0,0 +1,76 @@
+# For detailed comments on animation and the techniqes used here, see
+# the wiki entry
+# http://www.scipy.org/wikis/topical_software/MatplotlibAnimation
+
+# The number of blits() to make before exiting
+NBLITS = 1000
+
+import matplotlib
+matplotlib.use('WXAgg')
+matplotlib.rcParams['toolbar'] = 'None'
+
+import wx
+import sys
+import pylab as p
+import numpy as npy
+import time
+
+
+# allow the user to disable the WXAgg accelerator from the command line
+if '--no-accel' in sys.argv:
+ import matplotlib.backends.backend_wxagg
+ matplotlib.backends.backend_wxagg._use_accelerator(False)
+
+
+ax = p.subplot(111)
+canvas = ax.figure.canvas
+
+
+p.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
+p.grid() # to ensure proper background restore
+
+# create the initial line
+x = npy.arange(0,2*npy.pi,0.01)
+line, = p.plot(x, npy.sin(x), animated=True, lw=2)
+
+# for profiling
+tstart = time.time()
+blit_time = 0.0
+
+def update_line(*args):
+ global blit_time
+
+ if update_line.background is None:
+ update_line.background = canvas.copy_from_bbox(ax.bbox)
+
+ # restore the clean slate background
+ canvas.restore_region(update_line.background)
+ # update the data
+ line.set_ydata(npy.sin(x+update_line.cnt/10.0))
+ # just draw the animated artist
+ ax.draw_artist(line)
+ # just redraw the axes rectangle
+
+ t = time.time()
+ canvas.blit(ax.bbox)
+ blit_time += time.time() - t
+
+ if update_line.cnt == NBLITS:
+ # print the timing info and quit
+ frame_time = time.time() - tstart
+ print '%d frames: %.2f seconds' % (NBLITS, frame_time)
+ print '%d blits: %.2f seconds' % (NBLITS, blit_time)
+ print
+ print 'FPS: %.2f' % (NBLITS/frame_time)
+ print 'BPS: %.2f' % (NBLITS/blit_time)
+ sys.exit()
+
+ update_line.cnt += 1
+ wx.WakeUpIdle()
+
+
+
+update_line.cnt = 0
+update_line.background = None
+wx.EVT_IDLE(wx.GetApp(), update_line)
+p.show()
Copied: trunk/matplotlib/examples/animation/dynamic_collection.py (from rev 5143, trunk/matplotlib/examples/dynamic_collection.py)
===================================================================
--- trunk/matplotlib/examples/animation/dynamic_collection.py (rev 0)
+++ trunk/matplotlib/examples/animation/dynamic_collection.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -0,0 +1,48 @@
+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)
+ 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)
+ fig.canvas.draw()
+
+fig.canvas.mpl_connect('key_press_event', onpress)
+
+show()
Copied: trunk/matplotlib/examples/animation/dynamic_demo_wx.py (from rev 5143, trunk/matplotlib/examples/dynamic_demo_wx.py)
===================================================================
--- trunk/matplotlib/examples/animation/dynamic_demo_wx.py (rev 0)
+++ trunk/matplotlib/examples/animation/dynamic_demo_wx.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -0,0 +1,132 @@
+#!/usr/bin/env python
+"""
+Copyright (C) Jeremy O'Donoghue, 2003
+
+License: This work is licensed under the PSF. A copy should be included
+with this source code, and is also available at
+http://www.python.org/psf/license.html
+
+This is a sample showing how to embed a matplotlib figure in a wxPanel,
+and update the contents whenever a timer event occurs. It is inspired
+by the GTK script dynamic_demo.py, by John Hunter (should be supplied with
+this file) but I have assumed that you may wish to embed a figure inside
+your own arbitrary frame, which makes the code slightly more complicated.
+
+It goes without saying that you can update the display on any event, not
+just a timer...
+
+Should you require a toolbar and navigation, inspire yourself from
+embedding_in_wx.py, which provides these features.
+
+Modification History:
+$Log$
+Revision 1.7 2005/06/15 20:24:56 jdh2358
+syncing for 82
+
+Revision 1.6 2004/10/26 18:08:13 astraw
+Converted to use new NavigationToolbar2 (from old Toolbar).
+
+Revision 1.5 2004/06/26 06:37:20 astraw
+Trivial bugfix to eliminate IndexError
+
+Revision 1.4 2004/05/03 12:12:26 jdh2358
+added bang header to examples
+
+Revision 1.3 2004/03/08 22:17:20 jdh2358
+
+* Fixed embedding_in_wx and dynamic_demo_wx examples
+
+* Ported build to darwin
+
+* Tk:
+
+ removed default figman=None from nav toolbar since it needs the
+ figman
+
+ fixed close bug
+
+ small changes to aid darwin build
+
+Revision 1.2 2004/02/26 20:22:58 jaytmiller
+Added the "numerix" Numeric/numarray selector module enabling matplotlib
+to work with either numarray or Numeric. See matplotlib.numerix.__doc__.
+
+Revision 1.1 2003/12/30 17:22:09 jodonoghue
+First version of dynamic_demo for backend_wx
+"""
+
+
+import matplotlib
+matplotlib.use('WX')
+from matplotlib.backends.backend_wx import FigureCanvasWx,\
+ FigureManager, NavigationToolbar2Wx
+
+from matplotlib.figure import Figure
+import numpy
+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 = FigureCanvasWx(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
+ self.figmgr = FigureManager(self.canvas, 1, self)
+ # 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):
+ a = self.fig.add_subplot(111)
+ self.ind = numpy.arange(60)
+ tmp = []
+ for i in range(60):
+ tmp.append(numpy.sin((self.ind+i)*numpy.pi/15))
+ self.X = numpy.array(tmp)
+ self.lines = a.plot(self.X[:,0],'o')
+ self.count = 0
+
+ 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.count += 1
+ if self.count >= 60: self.count = 0
+ self.lines[0].set_data(self.ind, self.X[:,self.count])
+ self.canvas.draw()
+ self.canvas.gui_repaint()
+
+if __name__ == '__main__':
+ app = PySimpleApp()
+ frame = PlotFigure()
+ frame.init_plot_data()
+
+ # Initialise the timer - wxPython requires this to be connected to the
+ # receivicng event handler
+ t = Timer(frame, TIMER_ID)
+ t.Start(100)
+
+ frame.Show()
+ app.MainLoop()
Copied: trunk/matplotlib/examples/animation/dynamic_image_wxagg.py (from rev 5143, trunk/matplotlib/examples/dynamic_image_wxagg.py)
===================================================================
--- trunk/matplotlib/examples/animation/dynamic_image_wxagg.py (rev 0)
+++ trunk/matplotlib/examples/animation/dynamic_image_wxagg.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -0,0 +1,100 @@
+#!/usr/bin/env python
+"""
+Copyright (C) 2003-2004 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 matplotlib.cm as cm
+
+from matplotlib.backends.backend_wxagg import Toolbar, FigureCanvasWxAgg
+
+from matplotlib.figure import Figure
+import numpy as npy
+import wx
+
+
+TIMER_ID = wx.NewId()
+
+class PlotFigure(wx.Frame):
+
+ def __init__(self):
+ wx.Frame.__init__(self, None, -1, "Test embedded wxFigure")
+
+ self.fig = Figure((5,4), 75)
+ self.canvas = FigureCanvasWxAgg(self, -1, self.fig)
+ self.toolbar = Toolbar(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(wx.Size(fw, th))
+
+ # Initialise the timer - wxPython requires this to be connected to
+ # the receiving event handler
+ self.t = wx.Timer(self, TIMER_ID)
+ self.t.Start(10)
+
+ # Create a figure manager to manage things
+
+ # Now put all into a sizer
+ sizer = wx.BoxSizer(wx.VERTICAL)
+ # This way of adding to sizer allows resizing
+ sizer.Add(self.canvas, 1, wx.LEFT|wx.TOP|wx.GROW)
+ # Best to allow the toolbar to resize!
+ sizer.Add(self.toolbar, 0, wx.GROW)
+ self.SetSizer(sizer)
+ self.Fit()
+ self.Bind(wx.EVT_TIMER, self.onTimer, id=TIMER_ID)
+ self.Bind(wx.EVT_CLOSE, self.onClose)
+
+ def init_plot_data(self):
+ # jdh you can add a subplot directly from the fig rather than
+ # the fig manager
+ a = self.fig.add_subplot(111)
+ self.x = npy.arange(120.0)*2*npy.pi/120.0
+ self.x.resize((100,120))
+ self.y = npy.arange(100.0)*2*npy.pi/100.0
+ self.y.resize((120,100))
+ 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')
+
+ 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 onClose(self, evt):
+ self.t.Stop()
+ evt.Skip()
+
+ def onEraseBackground(self, evt):
+ # this is supposed to prevent redraw flicker on some X servers...
+ pass
+
+if __name__ == '__main__':
+ app = wx.PySimpleApp()
+ frame = PlotFigure()
+ frame.init_plot_data()
+
+ frame.Show()
+ app.MainLoop()
Copied: trunk/matplotlib/examples/animation/dynamic_image_wxagg2.py (from rev 5143, trunk/matplotlib/examples/dynamic_image_wxagg2.py)
===================================================================
--- trunk/matplotlib/examples/animation/dynamic_image_wxagg2.py (rev 0)
+++ trunk/matplotlib/examples/animation/dynamic_image_wxagg2.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -0,0 +1,100 @@
+#!/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()
+
Deleted: trunk/matplotlib/examples/animation_blit.py
===================================================================
--- trunk/matplotlib/examples/animation_blit.py 2008-05-16 19:20:04 UTC (rev 5150)
+++ trunk/matplotlib/examples/animation_blit.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -1,57 +0,0 @@
-#!/usr/bin/env python
-
-# For detailed comments on animation and the techniques used here, see
-# the wiki entry
-# http://www.scipy.org/wikis/topical_software/MatplotlibAnimation
-import sys
-import time
-
-import gtk, gobject
-
-import matplotlib
-matplotlib.use('GTKAgg')
-import numpy as npy
-import pylab as p
-
-
-ax = p.subplot(111)
-canvas = ax.figure.canvas
-
-p.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
-p.grid() # to ensure proper background restore
-
-# create the initial line
-x = npy.arange(0,2*npy.pi,0.01)
-line, = p.plot(x, npy.sin(x), animated=True, lw=2)
-
-# for profiling
-tstart = time.time()
-
-def update_line(*args):
- 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
- try:
- ax.draw_artist(line)
- except AssertionError:
- return
- # 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)
- sys.exit()
-
- update_line.cnt += 1
- return True
-
-update_line.cnt = 0
-update_line.background = None
-gobject.idle_add(update_line)
-p.show()
Deleted: trunk/matplotlib/examples/animation_blit_fltk.py
===================================================================
--- trunk/matplotlib/examples/animation_blit_fltk.py 2008-05-16 19:20:04 UTC (rev 5150)
+++ trunk/matplotlib/examples/animation_blit_fltk.py 2008-05-16 19:47:10 UTC (rev 5151)
@@ -1,54 +0,0 @@
-import sys
-import fltk
-import matplotlib
-matplotlib.use('FltkAgg')
-import pylab as p
-import numpy as npy
-import time
-
-
-# save the clean slate background -- everything but the animated line
-# is drawn and saved in the pixel buffer background
-class animator:
- def __init__(self,ax):
- self.ax=ax
- self.canvas=ax.figure.canvas
- self.canvas.mpl_connect('draw_event',self.clear)
- self.cnt=0
- self.background=None
-
- # for profiling
- ...
[truncated message content] |