shots = ( ('simple_plot', 'The most basic plot, with text labels', 1), ('subplot_demo', """Multiple regular axes are created with subplot. This is a screenshot of the matplotlib figure window. Navigation controls on the bottom of the figure support a variety of pan and zoom modes.""", 0), ('histogram_demo', """The hist command automatically generates histograms and will return the bin counts or probabilities""", 1), ('barchart_demo', """The bar command takes error bars as an optional argument. You can also use up and down bars, stacked bars, 'candlestick' bars, etc, ... See bar_stacked.py for another example. You can make horizontal bar charts with the barh command. """, 1), ('pie_demo', """The pie command uses a matlab(TM) compatible syntax to produce py charts. Optional features include auto-labeling the percentage of area, "exploding" one or more wedges out from the center of the pie, and a shadow effect. """, 1), ('table_demo', """The table is an interface to the Table class to build tables on the axes. """, 1), ('scatter_demo2', """The scatter command makes a scatter plot with (optional) size and color arguments. This example plots changes in Intel's stock price from one day to the next with the sizes coding trading volume and the colors coding price change in day i. Here the alpha attribute is used to make semitransparent circle markers with the Agg backend """, 1), ('slider_demo', """Matplotlib has basic GUI widgets that are independent of the graphical user interface you are using, allowing you to write cross GUI figures and widgets. See widgets classdocs and examples/widgets/*.py""", 1), ('fill_demo', """The fill, command lets you plot filled polygons. Thanks to Andrew Straw for providing this function.""", 1), ('date_demo', """ You can plot date data with major and minor ticks and custom tick formatters for both the major and minor ticks; see ticker and dates for details and usage. This plot uses the finance module to retrieve stock data.""", 1), ('finance_work2', """ You can make much more sophisticated financial plots. This example emulates one of the ChartDirector financial plot. Some of the data in the plot, are real financial data, some are random traces that I used since the goal was to illustrate plotting techniques, not market analysis!""", 1), ('plotmap', """Jeff Whitaker provided this example showing how to efficiently plot a collection of lines over a colormap image using the basemap matplotlib toolkit (available from the download page). Many map projections are handled via the proj4 library: cylindrical equidistant, mercator, lambert conformal conic, lambert azimuthal equal area, albers equal area conic and stereographic. """, 1), ('log_shot', """The semilogx, semilogy and loglog commands generate log scaling on the respective axes. The lower subplot uses a base10 log on the xaxis and a base 4 log on the y. Thanks to Andrew Straw, Darren Dale and Gregory Lielens for contributions to the log scaling infrastructure.""", 1), ('polar_demo', """The polar command generates polar plots.""", 1), ('legend_demo', """The legend command automatically generates figure legends, with matltab compatible legend placement commands. Thanks to Charles Twardy for input on the legend command""", 1), ('mathtext_demo', """The mathtext module provides TeX style mathematical expressions using freetype2 and the BaKoMa computer modern fonts. See the mathtext module for usage, licensing and backend information. matplotlib mathtext is an independent implementation, and does not required TeX or any external packages installed on your computer.""", 1), ('tex_demo', """ In addition to having it's own mathematical typesetting engine shown in the mathtext_demo above, you can also use TeX itself, and embed TeX output directly in a *Agg or PS matplotlib backend. """, 1), ('pcolor_demo', """The pcolor command generates pseudo color plots. matplotlib has 14 built-in colormaps. The hot colormap is shown here with contours overaying a grayscale image.""", 1), ('layer_images', """You can layer multiple images of different shapes and colormaps with alpha blending using the imshow command.""", 1), ('mri_with_eeg', """A magnetic resonace image (MRI) displayed using pcolor, image intensity in the MRI plotted with hist, and some EEG channels plotted as lines """, 1), ('text_themes', """You can specify themes for your axis text by making a font dictionary. Here the default font is courier and the default color is red, but you can override the defaults, as in the function label in the axes. See text for more information. This example uses a python dictionary to control text themes, but you can also use matlab handle graphics calls. See the examples file text_handles.py in the src distribution for a handle graphics demo.""", 1), ('align_text', """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.""", 1), ('axes_demo', """Arbitrary placement of axes is possible with the axes command. Here, two inset axes are placed over a subplot.""", 1), ('eeg', """ You can embed matplotlib into a pygtk, wxpython or Tk applications. Here is a screenshot of an eeg viewer written in pygtk using matplotlib; the lower axes is using specgram to plot the spectrogram of one of the EEG channels. The code demo linked above is a much simpler example of embedding matplotlib in pygtk. For an example of how to use the navigation toolbar in your applications, see embedding_in_gtk2.py. If you want to use matplotlib in a wx application, see embedding_in_wx2.py. If you want to work with glade, see mpl_with_glade.py """, 0), ) @header@

Matplotlib sample code and figures

Click on any image to enlarge

+ for shot, desc, mat in shots: -
Code: @shot@.py
+ if mat:
= else: -
@desc@


@footer@