<p dir="ltr">I don't think there should be any issues with the existing plot collection. This is the first I have seen of it, and I am keen to fix it. I rely on this functionality for my own work as well; any regressions here are bugs.</p>

<p dir="ltr">Which version of matplotlib are you on? And, can you replicate this using the DD0010 that comes with yt, or any of the workshop data sets?</p>
<div class="gmail_quote">On Apr 26, 2013 7:40 PM, "Nathan Goldbaum" <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">As Geoffrey mentioned, you can manually construct the histogram using BinnedProfile1D or BinnedProfile2D and then plot it up yourself using e.g. matplotlib's pyplot.<div><br></div><div>It's on my radar to finish up Matt's improved profile plotting interface but for right now the only way to do this is via PlotCollection.</div>


</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 26, 2013 at 4:38 PM, Geoffrey So <span dir="ltr"><<a href="mailto:gsiisg@gmail.com" target="_blank">gsiisg@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I think another way of doing similar things is using BinnedProfile2D, or if the dataset is small matplotlib has a histogram2d which I sometimes use.<div>


<br></div><div>From</div><span><font color="#888888"><div>G.S.</div></font></span></div><div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 26, 2013 at 4:15 PM, David Collins <span dir="ltr"><<a href="mailto:dcollins4096@gmail.com" target="_blank">dcollins4096@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>I was under the impression that these things used the values of take_log that from FieldInfo, which is False for the velocity components. <br>



<br></div>Using Density instead of x-velocity still throws the same error.<span><font color="#888888"><br>
<br></font></span></div><span><font color="#888888">d.<br></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 26, 2013 at 5:11 PM, Geoffrey So <span dir="ltr"><<a href="mailto:gsiisg@gmail.com" target="_blank">gsiisg@gmail.com</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Could it also be trying to take log of negative values in the velocity?  If so changing x-velcity to another positive field would not end in error.<div>




<br></div><div>From</div><div>G.S.</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote"><div><div>On Fri, Apr 26, 2013 at 4:06 PM, David Collins <span dir="ltr"><<a href="mailto:dcollins4096@gmail.com" target="_blank">dcollins4096@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<div dir="ltr"><div><div><div>Hi, all--<br><br></div>I'm running into problems making phase objects.  It looks like the error is in the color bar, and is similar to other errors I get when trying to use PlotCollections.  The hash I'm on is 34b95297062b.  I'm trying:<br>






<br>pf = load(fname)<br>
pc = PlotCollection(pf,'c')<br>phase=pc.add_phase_object(pf.h.all_data(),['CellMass',<br>    'x-velocity','CellVolume'],weight=None)<br><br></div>min/max are as follows:<br>CellMass: [4.1e-12,1.5e-03] (30631133,) <br>







</div>x-velocity: [-7.2e+01,5.5e+01]<br><div><div><div>CellVolume: [1.45e-11,6.0e-08]<br><br></div><div>Is there a more up-to-date manner to do this that doesn't use PlotCollection? Or is there something obvious that I'm missing?<br>






<br></div><div>It seems to be choking in <a href="http://plot_types.py/__init_colorbar" target="_blank">plot_types.py/__init_colorbar</a><br>
<br>    def __init_colorbar(self):<br>        temparray = np.ones((self.x_bins.size, self.y_bins.size))<br>        self.norm = matplotlib.colors.Normalize()<br>        self.image = self._axes.pcolormesh(self.x_bins, self.y_bins,<br>







                                      temparray, shading='flat',<br>                                      norm=self.norm, cmap=self.cmap,<br>                                      rasterized=True)<br>        self.colorbar = self._figure.colorbar(self.image,<br>







                                    extend='neither', shrink=0.95,<br>                                    format="%0.2e" )<br></div><div><br>It looks like what's happening is figure.colorbar chokes on the fact that temparray is "ones", so the spacing between elements is zero.  This is outside of my yt knowledge, though.<br>






<br>Traceback (most recent call last):<br>  File "<stdin>", line 1, in <module><br>  File "p14_phase_test.py", line 4, in <module><br>    phase=pc.add_phase_object(pf.h.all_data(),['CellMass','x-velocity','CellVolume'])<br>







  File "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/visualization/plot_collection.py", line 1184, in add_phase_object<br>    figure=figure, axes=axes))<br>  File "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/visualization/plot_types.py", line 815, in __init__<br>







    self.__init_colorbar()<br>  File "/nics/b/home/collins/local_2013_03_12/src/yt-hg/yt/visualization/plot_types.py", line 834, in __init_colorbar<br>    format="%0.2e" )<br>  File "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/figure.py", line 1387, in colorbar<br>







    cb = cbar.colorbar_factory(cax, mappable, **kw)<br>  File "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py", line 1173, in colorbar_factory<br>    cb = Colorbar(cax, mappable, **kwargs)<br>







  File "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py", line 854, in __init__<br>    ColorbarBase.__init__(self, ax, **kw)<br>  File "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py", line 298, in __init__<br>







    self.draw_all()<br>  File "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py", line 323, in draw_all<br>    self._config_axes(X, Y)<br>  File "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py", line 409, in _config_axes<br>







    self.update_ticks()<br>  File "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py", line 345, in update_ticks<br>    ticks, ticklabels, offset_string = self._ticker()<br>







  File "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py", line 560, in _ticker<br>    ticks = self._locate(b)<br>  File "/nics/b/home/collins/local_2013_03_12/lib/python2.7/site-packages/matplotlib/colorbar.py", line 808, in _locate<br>







    z = np.take(y, i0) + (xn-np.take(b,i0))*dy/db<br>FloatingPointError: invalid value encountered in divide<br><br></div></div></div></div>
<br></div></div>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div>