Graph in wxPython

John Hunter jdhunter at ace.bsd.uchicago.edu
Sat Jan 3 08:03:18 CET 2004


>>>>> "Oh" == Oh Kyu Yoon <okyoon at stanford.edu> writes:

    Oh> Does anyone know how to implement plots from scipy, chaco, etc
    Oh> into wxPython widget?

matplotlib has a wxpython plotting backend, which supports interactive
data exploration and hardcopy save to a variety of output formats --
http://matplotlib.sourceforge.net

Here's a sample script:

  import matplotlib
  matplotlib.use('WX')
  from matplotlib import plot, show
  plot([1,2,3])
  show()

You can use matplotlib interactively from the python shell, in batch
python scripts, or embed it in wxpython application window.  Or you
can use it offline w/o a GUI environment to make hardcopy plots in
PNG, PS or other formats.

See the example examples/embedding_in_wx.py for demo code showing how
to embed matplotlib figures into wx apps.

matplotlib also supports GTK, PS and GD.

biasedly-yours,
JDH




More information about the Python-list mailing list