Chaco ToolbarPlot: change default toolbar

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Chaco ToolbarPlot: change default toolbar

This post has NOT been accepted by the mailing list yet.
Dear all,

I need to include a toolbar in my plots, in such a way that i can save the plot, retrieve the data ( and later save them in a certain format),...

I therefore use the ToolbarPlot class, which has a default toolbar, and try to incude an extra button, defined in the class SaveToDataFormat

The code is the following:

from enthought.chaco.toolbar_plot import ToolbarPlot
from import PlotToolbar
from modules.additional_buttons import SaveToDataFormat

plotdata = ArrayPlotData(x=x, y=y)
plot = ToolbarPlot(plotdata)

But this makes that the extra button is added outside the toolbar, that i already full with the default buttons.

My question is: how can i remove unnecessary buttons from this toolbar ? And how can i redraw the toolbar such as to have the extra buttons within the toolbar ?