From: matthew a. <ma...@ca...> - 2004-01-05 22:57:49
|
On Mon, 5 Jan 2004, John Hunter wrote: > >>>>> "matthew" == matthew arnison <ma...@ca...> writes: > > matthew> The matplotlib docs say you need to specify the backend > matthew> before importing matplotlib.matlab. But this seems a bit > matthew> restrictive: what if I want to display a plot on screen, > matthew> and then output the same plot to postscript and print it? > matthew> Normally imports are done only once at the top of a file, > matthew> but I'd like to be able to switch backends anywhere. > > But there is no reason you shouldn't be able to create a PS figure or > a GD figure to save. I've been meaning to add a 'PS' extension > checker in the savefig command that would enable you to save to PS > from any backend. > > Is this primarily what you need to switch backends for? Yes that's the sweet spot. Presumably the Save button on the GTK/WX GUI just calls savefig()? In which case you'd be able to save postscript from there too, which would be popular too I think. Another thing that would be handy is a simple cross-platform recipe (or function call?) for spawning persistent plot windows that don't block execution of the calling script. It may have been on this list (I should really search before asking) but it should be in the matplotlib docs I think. Oh yeah, and a default keyboard shortcut (or three! Esc, Q, Ctrl-Q) for quitting the plot window. And, being able to put the legend outside the plot area (either within a subplot, or outside all the subplots if the legend is the same for all). A big legend tends to cover up the data. Cheers, Matthew. |