This is an archival dump of old wiki content --- see scipy.org for current material.
Please see http://scipy-cookbook.readthedocs.org/

The cookbook is a place for community contributions of recipes, howtos and examples.

Complete documentation and tutorials for matplotlib can be found at matplotlib's webpage


Contents

  1. Simple Plotting
  2. Pseudo Color Plots
  3. Typesetting
  4. 3D Plotting
  5. Embedding Plots in Apps
  6. Misc

Simple Plotting

  • Sigmoidal Functions - plotting simple functions

    • sigmoids_small.png

  • Multiline Plots - how to plot multiple lines over one another

    • multiline.png

  • Bar Charts - how to make a bar chart

    • barchartscaled.png

  • Common Errors - Compilation of common errors that can cause erroneous behavior. Check before emailing mailing lists.

  • /Animations - how to animate your figures.

  • Multicolored Line - different colors for different parts of a line

    • colored_line.png

  • Shaded Regions - how to plot grey shaded regions using transparency.

    • shaded_small.png

  • /Arrows - how to plot arrows

    • plot_arrow_small.png

  • Unfilled Histograms - how to plot histograms that are un-filled and don't look like bar charts.

    • hist_outline_small.png

  • Cookbook/Histograms - 2D histograms with variable bin width.

    • Cookbook/Histograms/histogram2d.png

  • Custom Log Plot Labels - plotting log plots with custom tick labels that are formatted as integer numbers rather than exponents as is the default.

    • log_labels_small.png

  • Thick Axes - how to make thick axes lines and bold fonts.

    • thick_axes.png

  • /Maps - how to plot data on map projections

    • basemap1.png

  • Plotting values with masked arrays - How to plot only selected values of an array, because some values are meaningless (detector malfunction), out of range, etc. etc.

  • /Transformations - Using transformations to convert between different coordinate systems.

  • TreeMap - classic treemap style plots

  • /Legend - Adding a legend to your plot

  • Hinton Diagrams - A way of visualizing weight matrices

    • hinton-small.png

Pseudo Color Plots

Typesetting

  • Using TeX - formatting matplotlib text with LaTeX

    • tex_demo.png

  • LaTeX Examples - Complete examples for generating publication quality figures using LaTeX.

3D Plotting

NOTE: Experimental work has been going on to integrate 3D plotting functionality into matplotlib. Please see the related mplot3d documentation or take a look at matplotlib gallery for example 3D plots. For a more sophisticated 3D visualization and plotting interface, you can try Mayavi which is actively maintained and features an 'mlab' interface similar to matplotlib's 'pylab'.

  • 3D plots - Simple 3D plots using matplotlibs built-in 3D functions (which were originally provided by John Porter's mplot3d add-on module).

    • contourf3D.jpg

  • VTK Integration - How to import plots into VTK.

    • mpl_vtk.png

Embedding Plots in Apps

Misc


SciPy: Cookbook/Matplotlib (last edited 2015年10月24日 17:48:26 by anonymous)

AltStyle によって変換されたページ (->オリジナル) /