I'm trying to make a simple utility for doing a quick check of some data (electrophysiology recordings from our fMRI scanner lab). I want it to be foolproof as much as possible, so I was trying to figure out how to write a script that would try to plot to the display, then if that didn't work, to save it to a file instead (preferably as pdf, but I could live with png if that was the only option.)
I've been searching the documentation and code examples for a while, and all I can find seems to suggest that the choice of display vs. file is predetermined at the very beginning by the choice of backend. I suppose that would mean I'd have to put the whole thing inside a try block, then if that didn't work, start over from scratch with a different backend and build the plot again. I was hoping to find a way to build the plot, then just try to "show" it or something like that, and if that failed, then save it instead. But so far I have not been able to figure out such a thing. So I would appreciate any help! Thanks very much! -- -dave---------------------------------------------------------------- "Pseudo-colored pictures of a person's brain lighting up are undoubtedly more persuasive than a pattern of squiggles produced by a polygraph. That could be a big problem if the goal is to get to the truth." -Dr. Steven Hyman, Harvard ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users