suggestion for the toolbar

Hi John, What do you think of adding a button to the

    > standara toolbar allowing the plotted data to be save in
    > CSV format?

My initial thought is this would be hard to do well. Axes can contain
an arbitrary combination of lines, text and patches (of which there
are many types). The lines can be different lengths. The plot can
contain an arbitrary number of axes. How to export these in a
meaningful way so that the code on the other side can load and use it
is not clear to me.

Perhaps you should write a function

  def line_to_csv(l, fname):
    # export the x and y line data to csv

likewise you may want

  def hist_output_to_csv(args)

and call these functions from your python script as necessary. Take a
look at the file examples/object_picker.py (requires gtk backend),
where you can select an individual line with the mouse. It wouldn't
be hard to plug an export to csv function together with this picker
functionality.

But it seems that for the most part these are specialized use cases
that may be better handled on your end by writing your own functions
and subclassing the NavigationToolbar to add your own buttons (easy to
do, I can provide some example code if you like) because I suspect
there would be little agreement about what export functionality is
desirable.

    > Talking about plots, I am writing a module to calculate
    > Kernel density estimates (a kind of continuous histogram)
    > would you be interested in adding it to matplotlib?

Please send me the module code and some demo script and I'll take a
look. I'm happy to include useful numerical and statistical code in
matplotlib.mlab or wherever appropriate. Maybe a few online
references where I can read about kernel density estimates too...

Thanks!
JDH