Hi, Nathan--

I thought about the colorbar thing, so I made the image grayscale and it still doesnt' show up.  I also set the zlim so that the data was either all white or black, and it shows up in neither.

I've attached two representative images.  By construction all of these contours are disjoint.  The missing clump is pretty obvious, as it takes up most of the image where it exists. 

The two attached plots are two tweaks to plot_modifications.py/ClumpContourCallback, at line ~700
the "plus_3" plot uses
self.rv = plot._axes.contour(buff,  len(self.clumps)+3,
the "plus_5" plot uses
self.rv = plot._axes.contour(buff,  len(self.clumps)+5,

The code to reproduce the plot is pretty benign, and is below for generality.  the list clumps_to_use comes from a set of pickled clumps for this dataset.  I'll see if I can reproduce it with something more universally accessible.  I'm quite sure that it doesn't have anything to do with the clump itself, as I've seen this behavior with other calls to 'contour'.  I'm working on a simpler thing that demonstrates this-- I've seen it with code that uses no piece of yt, so I'm 97.2% sure that it's contour and not yt.  (Might be something else dumb I'm doing, that's pretty common, but I haven't been able to sort out what it is.)

    center = [0.5]*3
    proj = pf.h.proj(ax,field,center=center)
    plot = proj.to_pw(origin='domain')
    subset = 'black_map_fixed'
    if clumps_to_use is not None:
    print plot.save('%s_n%04d_%s'%(name,frame,subset))

On Mon, May 20, 2013 at 4:21 PM, Nathan Goldbaum <nathan12343@gmail.com> wrote:
Hi Dave,

I haven't seen this.  Could this be due to the colorbar?  I believe it picks the contour colors based on a colorbar.  If the colors it picks are invisible on your plot, you won't see the contours.

It would help to figure out what's going on if you could come up with a sample script that illustrates the issue.  Bonus points if you use one of the datasets on yt-project.org/data.


On Mon, May 20, 2013 at 3:17 PM, david collins <dcollins4096@gmail.com> wrote:
Hi, all--

I'm seeing a glitch in the matplotlib countor function, as employed by annotate_clumps.  As is, I'm seeing some clumps that are not plotted by the countour plotter unless I bump the number of contours-- I get all the plots if I change the contour line to:

self.rv = plot._axes.contour(buff, len(self.clumps)+5,

instead of 

self.rv = plot._axes.contour(buff, len(self.clumps)+1,

Is this a glitch that anyone is aware of?  Is there a more general fix?  The clump contour is not the only time I've run into this glitch. It seems to happen on large contours, for what that's worth.


yt-users mailing list

yt-users mailing list