Re: [matplotlib-devel] imsave function

2009-11-08 Thread Gary Ruben
So I think the change I suggested takes care of the floating point case, except that the vmin and vmax values don't default to 0.0 and 1.0. I wonder whether this is enough of a surprise to warrant some logic to set vmin and vmax in some cases, such as iff all array values are floats in the ra

Re: [matplotlib-devel] imsave function

2009-11-08 Thread Stéfan van der Walt
Hi Gary Sorry, I didn't even read the docstring since I have been using SciPy's "imsave" so far. 2009/11/8 Gary Ruben : > This may be all you need. My tests (in the attached test.py) appear to > work. However, I don't think it's what you want. By default, figimage > even expects NxMx3 and NxMx4 a

Re: [matplotlib-devel] imsave function

2009-11-07 Thread Gary Ruben
Currently imsave (implemented in the image.py file) only deals with greyscale single-plane images, i.e. 2D arrays, and in my defence, it's in the docstring, so I wouldn't call it a bug. However, it's a reasonable expectation that it support rgb and rgba since it is basically a thin wrapper arou

Re: [matplotlib-devel] imsave function

2009-11-07 Thread Stéfan van der Walt
Hey all, 2009/2/10 Andrew Straw : > Gary Ruben wrote: >> Hi Andrew, >> >> I don't have commit access. If you would check it in, that would be great. > > Committed to the trunk in r6899... Thanks! > > And, sheesh, SourceForge's SVN server is slooow today for me, although > it seems to have finally

Re: [matplotlib-devel] imsave function

2009-02-09 Thread Andrew Straw
Gary Ruben wrote: > Hi Andrew, > > I don't have commit access. If you would check it in, that would be great. Committed to the trunk in r6899... Thanks! And, sheesh, SourceForge's SVN server is slooow today for me, although it seems to have finally improved.

Re: [matplotlib-devel] imsave function

2009-02-09 Thread Gary Ruben
Hi Andrew, I don't have commit access. If you would check it in, that would be great. thanks for offering, Gary Andrew Straw wrote: > Gary, this looks fine to me. Do you have commit access? If not, I'll be > happy to check it in for you. > > -Andrew ---

Re: [matplotlib-devel] imsave function

2009-02-09 Thread Andrew Straw
Gary, this looks fine to me. Do you have commit access? If not, I'll be happy to check it in for you. -Andrew Gary Ruben wrote: > Thanks for the quick test and comments Andrew. I've made your suggested > changes and attached a new patch. > > Gary > > Andrew Straw wrote: >> Hi Gary, I have a cou

Re: [matplotlib-devel] imsave function

2009-02-08 Thread Gary Ruben
Thanks for the quick test and comments Andrew. I've made your suggested changes and attached a new patch. Gary Andrew Straw wrote: Hi Gary, I have a couple comments: 1) No need for: +ax = fig.add_subplot(111) +ax.set_axis_off() 2) It's probably best to have maximum compatibility wit

Re: [matplotlib-devel] imsave function

2009-02-07 Thread Andrew Straw
Hi Gary, I have a couple comments: 1) No need for: +ax = fig.add_subplot(111) +ax.set_axis_off() 2) It's probably best to have maximum compatibility with imshow(). Therefore, use vmin=None and vmax=None as keyword arguments (rather than clims). Otherwise, I tested and it works for me.