All profiles have a supplemental field called "UsedBins" which is a boolean field. It's True wherever the bin has been touched, and False wherever it hasn't. You could use something like numpy's masked arrays to handle this, but it could also just be as simple as:
u = prof["UsedBins"] pyplot.loglog(prof["Density"][u], prof["Temperature"][u])
for the same effect.
Hope that helps!
On Fri, Aug 31, 2012 at 8:57 AM, Wolfram Schmidt email@example.com wrote:
I am calculating radial profiles with BinnedProfile1D, where the profile values happen to be zero in a few bins. This causes interruptions in the graphs when I plot the the profiles with pylab.loglog. I don't want to make the bins broader. So I would like to get rid of the empty bins (i.e., bins with zero values) by removing them from the profile lists or somehow tell the loglog function of pylab to ignore all zero values. Unfortunately, I have found a solution either way.
Can anyone help?
yt-dev mailing list firstname.lastname@example.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org