Closed GoogleCodeExporter closed 9 years ago
This issue was closed by revision 6f9290ee940c.
Original comment by rschr...@gmail.com
on 5 Oct 2012 at 1:32
This looks like the right place to fix it to me. I've pushed a change that is
a slight variation on your patch. Thanks!
As I was playing with this, I saw that visvis isn't doing such a good job
plotting NaNs or masked arrays. We can discuss that this issue #62.
Original comment by rschr...@gmail.com
on 5 Oct 2012 at 1:36
Good to learn about np.nanmin and np.nanmax!
Original comment by almar.klein@gmail.com
on 5 Oct 2012 at 8:59
I didn't fix this correctly.
>>> vv.plot([1,2,3,np.nan], [1,2,3,10], ms='.')
gives a y range of [1,10] instead of [1,3]. Ironically, this used to be
handled correctly in Mesh._GetLimits, but I took it out that bit of code
because I didn't understand what it was doing. I'll see if I can fix it this
evening.
Original comment by rschr...@gmail.com
on 5 Oct 2012 at 6:39
I've just pushed a commit that should fix these things up. This version will
also not get confused by infinities.
Almar, I haven't closed this since I'd like you to take a look at it, to double
check me. Also, there's two additional things worth a look:
1) The code in Line and Mesh._GetLimits() is very similar, but part of the code
for Mesh is within a try / except Exception: block. If we're expecting an
exception, we should make add this block to Line (and update it to mention a
specific exception). Otherwise, I'd recommend taking the block out, for
clarity.
2) I looked through the other _GetLimits() methods. Most of them are okay, I
think, but you should take a look at bar and boxplot, since they might have
similar problems. (I'm unfamiliar with both of them.)
Original comment by rschr...@gmail.com
on 7 Oct 2012 at 11:29
Looks good.
I fixed bar and boxplot. For both, I ended up checking for invalid values at
initialization, so the visualization handles it nicely too.
For the Mesh I think this is much harder, and probably less of a problem; I can
more easily see people try to plot/barplot/boxplot some invalid data then
trying to make a mesh of it.
As for the line, lets figure out how to deal with that in issue 62.
Original comment by almar.klein@gmail.com
on 8 Oct 2012 at 8:23
Original comment by almar.klein@gmail.com
on 8 Oct 2012 at 8:23
Original issue reported on code.google.com by
owe...@hotmail.com
on 3 Oct 2012 at 3:39