From: Eric F. <ef...@ha...> - 2010-01-16 19:04:07
|
Ian Thomas wrote: > Hello all, > > I think I have fixed two bugs in the contouring code (src/cntr.c): > 1) inconsistent behaviour in how contour and contourf handle saddle > grid squares, and > 2) incorrect handling of masked regions in filled contour plots. Ian, I have applied your patch and modified contourf_demo slightly to illustrate interior masking. Thanks very much for the beautiful work! These contour bugs that you fixed were major mpl problems--general embarrassments, and specific impediments to my own applications, since the data sets I work with often have masked interior regions. (And, I also use line contours on top of filled contours, so the saddle-point decision fix helps as well.) It occurs to me that there might be a nice refinement: when following a masked boundary, how hard would it be to cross the single-cell gap diagonally instead of proceeding step-wise along the boundary? In the case of the circular masked region that I added to the contourf_demo, this would simply smooth out the boundary of that region. Eric > > Attached is a gzipped tar file containing an explanation of the bugs > and what I've done, as well as an svn diff against HEAD and small > example scripts to demonstrate the bugs before and after the fixes. > > I have tested the fixes for the cases I normally come up with, but > this is by no means exhaustive. > > Ideally it would be good if someone who is more familiar with cntr.c > than I am could take a look at what I've done and see if it is OK. > > Ian Thomas > ian...@go... > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel |