Index of /~newville/Python/MPlot

      Name                    Last modified      Size  Description
Parent Directory - gnuplot-pslatex/ 2006-01-23 22:31 - MPlot-0.8.tar.gz 2006-07-20 17:05 92K MPlot-0.8.win32.exe 2007-08-15 13:27 107K MPlot-0.8.win32.zip 2006-07-20 17:05 57K MPlot-0.8.zip 2006-07-20 17:04 95K MPlot.Closure.html 2005-03-08 11:53 3.0K MPlot.colors.html 2005-03-08 11:53 3.0K MPlot.Config.html 2005-03-08 11:53 7.0K MPlot.GUIConfig.html 2005-03-08 11:43 130K MPlot.html 2005-03-08 11:42 7.2K MPlot.LabelEntry.html 2005-03-08 11:53 132K MPlot.odict.html 2005-03-08 11:53 4.0K MPlot.PlotFrame.html 2005-03-08 11:42 130K MPlot.PlotPanel.html 2005-03-08 11:42 125K MPlot.Printout.html 2005-03-08 11:53 8.5K mplot_conf.png 2006-01-24 22:53 48K mplot_main.png 2006-01-24 22:54 29K README.txt 2005-06-30 14:13 3.2K screenshots.html 2006-01-24 23:03 345

MPlot: a python package providing a 2D Plotting Frame, 
       using matplotlib and wx.

====
Contents:
  1. Directory Contents
  2. PlotFrame overview
  3. Notes, shortcomings and planned enhancements
  4. Suggested changes to matplotlib

====
Directory Contents:
   MPlot         package directory
   README        this file
   example_1.py  simplest example
   example_2.py  slightly more complicated example
   test.py       more elaborate example, including timing tests.

====
PlotFrame overview  

The principle object provided by MPlot are the PlotFrame and PlotPanel:

  MPlot.PlotFrame is a wxPython plotting component, that can be
  included in other applications to provide a simple way to plot
  2D data.  The PlotFrame provides capabilities for the user to:
     1. show X,Y coordinates (left-click)
     2. zoom in on a particular region of the plot (left-drag)
     3. customize titles, labels, legend, color, linestyle, marker,
        and whether a grid is shown.  A separate GUI window is used 
        to set these attributes.
     4. save plot images as PNGs, copy to system clipboard, or print.

For the programmer, MPlot.PlotFrame plots data in 1D Numeric (or numarray)
arrays, and provides these basic methods:
   plot(x,y):  start a new plot, and plot data x,y
      optional arguments (all keyword/value types):
          color='Blue'    for any X11 color name, (rgb) tuple, or '#RRGGBB'
          style='solid'   'solid,'dashed','dotted','dot-dash'
          linewidth=2     integer 0 (no line) to 10
          marker='None'   any of a wide range of marker symbols
          markersize=6    integer 0 to 30
          xlabel=' '      label for X Axis (MPlot text)    
          ylabel=' '      label for Y Axis (MPlot text)    
          title=' '       title for top of PlotFrame (MPlot text)    
          grid=True       boolean for whether to show grid.

   oplot(x,y):  plot data x,y, on same plot as current data
      optional arguments (all keyword/value types):
          color='Blue'    for any X11 color name, (rgb) tuple, or '#RRGGBB'
          style='solid'   'solid,'dashed','dotted','dot-dash'
          linewidth=2     integer 0 (no line) to 10
          marker='None'   any of a wide range of marker symbols
          markersize=6    integer 0 to 30

    clear():           clear plot
    save_figure():     bring up file dialog for saving image of figure
    set_statustext():  set text for statusbar.
    set_title():       set plot title
    set_xlabel():      set x label
    set_ylabel():      set y label

=====
Notes, shortcomings, and future work:

  1. The following matplotlib features are  not yet implemented,
     and are worth considering (no particular order):
       - error bars
       - automatic scaling for y-data with different ranges 
         (probably showing a second scale on the right side)
       - support for date data
       - different colors for marker interior/exterior
       - multiple subplots on a single PlotFrame/PlotPanel  
       
  2. Speed: the replotting speed (as in test.py) is acceptable 
     (~10Hz on my windows machine, ~7Hz on my G4 powerbook)
     but not as fast as I would like.

  3. Printing support is not perfect: seems like a wxPython issues

last update: 2005-Feb-05   Matt Newville <newville@cars.uchicago.edu>