Re: [matplotlib-devel] polar plotting and theta wrapping

2009-01-02 Thread Michael Droettboom
Eric Firing wrote: > Mike, Jan, > > Any attempt to normalize the angles to a fixed range of length 2 pi > inside of mpl is sure to wreck valid user code; it merely moves the > trouble spot to a different angle. Thanks for catching this. Clearly that was a bone-headed fix on my part... :( > > In

Re: [matplotlib-devel] Multipage pdf files

2009-01-02 Thread Michael Droettboom
It's slightly hackish, but would it be possible to do an "isinstance" check in savefig, and if the first arg is a PdfFile, set "format" to "pdf" automatically, and if "format" is set to something else raise an exception? A little hackish because it doesn't necessarily scale to other formats ea

Re: [matplotlib-devel] Multipage pdf files

2009-01-02 Thread Drain, Theodore R
Another (still slightly hacky) way might be to define an optional attribute of the file object. Something like this: if hasattr( outputFile, "mplFormat" ): format = getattr( outputFile, "mplFormat" ) Then have set PdfFile.mplFormat to be "pdf". This is a little less hacky in that it doesn

Re: [matplotlib-devel] polar plotting and theta wrapping

2009-01-02 Thread Eric Firing
Michael Droettboom wrote: > Eric Firing wrote: >> Mike, Jan, >> >> Any attempt to normalize the angles to a fixed range of length 2 pi >> inside of mpl is sure to wreck valid user code; it merely moves the >> trouble spot to a different angle. > Thanks for catching this. Clearly that was a bone-

Re: [matplotlib-devel] polar plotting and theta wrapping

2009-01-02 Thread Michael Droettboom
Eric Firing wrote: > Michael Droettboom wrote: >> Eric Firing wrote: >>> Mike, Jan, >>> >>> Any attempt to normalize the angles to a fixed range of length 2 pi >>> inside of mpl is sure to wreck valid user code; it merely moves the >>> trouble spot to a different angle. >> Thanks for catching thi

Re: [matplotlib-devel] Multipage pdf files

2009-01-02 Thread Jouni K . Seppänen
Or perhaps the user-visible object doesn't need to be the same PdfFile that is used internally (which I think should be file-like, since when we add better image compression, we will want to pass the PdfFile to the png/jpeg/whatever library to write to). Something like class PdfFileProxy: def