I have two suggestions about toolbar customization:
1. In the 'matplotlibrc' file the toolbar line should be changed in order to include a "custom toolbar"
toolbar : toolbar2 # None | classic | toolbar2 | custom
2. In the 'backend_tkagg.py file', inside the 'NavigationToolbar2TkAgg class' the
save_figure procedure should be changed to somewhat:
from tkFileDialog import asksaveasfilename
fname = asksaveasfilename(master=self.window,
title='Save the figure',
filetypes=[('Encapsulated Postscript File','*.eps'),
('Scalable Vector Graphics','*.svg'),
('Portable Network Graphics','*.png')])
if fname == "" :
bname, fext = os.path.splitext(fname)
I think that the asksaveasfilename function provided by tkFileDialog is "better"
3. In the code above there are three problems that I don't know how to solve (I am a Python newbie):
a) this solves only one backend...
b) I would like to provide the 'asksaveasfilename' an InitialFilename, such as in the commented line.
c) It would be much better to make my customizations by defining a "custom toolbar" instead of
tweaking the original one...