Re: [matplotlib-devel] spy: ignore zero values in sparse matrix

2008-10-04 Thread Tony S Yu
On Sep 26, 2008, at 5:01 PM, Eric Firing wrote: Also, if an image cannot be resolved by the output device, info is lost--one might not see anything at a location where there actually is a value--whereas with markers, a marker will always show up, and the only problem is that one can't

Re: [matplotlib-devel] spy: ignore zero values in sparse matrix

2008-10-04 Thread Eric Firing
Tony S Yu wrote: Hi Eric, Sorry for the late reply. On Sep 27, 2008, at 8:56 PM, Eric Firing wrote: Actually, I think the most logical thing would be to let the default None give the old behavior, and require precision=0 to get the new behavior. What do you think? Is it OK if I

Re: [matplotlib-devel] spy: ignore zero values in sparse matrix

2008-10-01 Thread Tony S Yu
Hi Eric, Sorry for the late reply. On Sep 27, 2008, at 8:56 PM, Eric Firing wrote: Actually, I think the most logical thing would be to let the default None give the old behavior, and require precision=0 to get the new behavior. What do you think? Is it OK if I make this change? It

Re: [matplotlib-devel] spy: ignore zero values in sparse matrix

2008-09-27 Thread Eric Firing
Tony S Yu wrote: On Sep 26, 2008, at 5:01 PM, Eric Firing wrote: Also, if an image cannot be resolved by the output device, info is lost--one might not see anything at a location where there actually is a value--whereas with markers, a marker will always show up, and the only problem is

Re: [matplotlib-devel] spy: ignore zero values in sparse matrix

2008-09-27 Thread Eric Firing
Tony S Yu wrote: On Sep 26, 2008, at 5:01 PM, Eric Firing wrote: Also, if an image cannot be resolved by the output device, info is lost--one might not see anything at a location where there actually is a value--whereas with markers, a marker will always show up, and the only problem is

[matplotlib-devel] spy: ignore zero values in sparse matrix

2008-09-26 Thread Tony S Yu
When sparse matrices have explicit zero values, `axes.spy` plots those zero values. This behavior seems unintentional. For example, the following code should have a main diagonal with markers missing in the middle, but `spy` currently plots a full main diagonal. #~~~ import

Re: [matplotlib-devel] spy: ignore zero values in sparse matrix

2008-09-26 Thread John Hunter
On Fri, Sep 26, 2008 at 12:39 PM, Tony S Yu [EMAIL PROTECTED] wrote: +if all(nonzero == False): +raise ValueError('spy cannot plot sparse zeros matrix') Is raising an exception the right choice here -- why can't we plot an all zeros image? JDH

Re: [matplotlib-devel] spy: ignore zero values in sparse matrix

2008-09-26 Thread Tony S Yu
On Sep 26, 2008, at 2:28 PM, John Hunter wrote: On Fri, Sep 26, 2008 at 12:39 PM, Tony S Yu [EMAIL PROTECTED] wrote: +if all(nonzero == False): +raise ValueError('spy cannot plot sparse zeros matrix') Is raising an exception the right choice here -- why

Re: [matplotlib-devel] spy: ignore zero values in sparse matrix

2008-09-26 Thread Tony S Yu
On Sep 26, 2008, at 3:38 PM, John Hunter wrote: On Fri, Sep 26, 2008 at 2:36 PM, Tony S Yu [EMAIL PROTECTED] wrote: Actually, now that I think about it: you could plot a trivially small image and just adjust the coordinates so that they correspond to the original matrix shape. Is this

Re: [matplotlib-devel] spy: ignore zero values in sparse matrix

2008-09-26 Thread Eric Firing
Tony S Yu wrote: On Sep 26, 2008, at 2:28 PM, John Hunter wrote: On Fri, Sep 26, 2008 at 12:39 PM, Tony S Yu [EMAIL PROTECTED] wrote: +if all(nonzero == False): +raise ValueError('spy cannot plot sparse zeros matrix') Is raising an exception the right