<div dir="ltr">What happens if you use the 'logs' keyword for create_profile to control the logging for temperature, velocity_magnitude, and dx?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 31, 2014 at 2:08 PM, Douglas Harvey Rudd <span dir="ltr"><<a href="mailto:drudd@uchicago.edu" target="_blank">drudd@uchicago.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
Is there a way to specify the log/non-log scaling of a y-axis variable in create_profile or ProfilePlot.from_profiles?  I have some profiles that start flat at an initial time and so the velocity_magnitude is everywhere 0.  create_profile succeeds, but ProfilePlot.from_profiles generates a Matplotlib error before I have the ability to specify a scaling:<br>
<br>
    sph = ds.sphere(ds.domain_center, ds.domain_width[0]/2)<br>
    profile = yt.create_profile(sph, "radius",<br>
                                ["density", "temperature", "velocity_magnitude", "dx"],<br>
                                extrema={'radius':(ds.domain_width[0]/ds.num_grid,ds.domain_width[0]/2.)},<br>
                                n_bins=int(ds.domain_width[0]*2.**(ds.max_level-1)),<br>
                                logs={'radius':False},<br>
                                units={'radius':'pc'})<br>
    plot = yt.ProfilePlot.from_profiles(profile)<br>
<br>
Relevant part of the dump:<br>
/software/python-2.7-2014q3-el6-x86_64/lib/python2.7/site-packages/matplotlib-1.4.0-py2.7-linux-x86_64.egg/matplotlib/ticker.pyc in view_limits(self, vmin, vmax)<br>
   1523         if minpos <= 0 or not np.isfinite(minpos):<br>
   1524             raise ValueError(<br>
-> 1525                 "Data has no positive values, and therefore can not be "<br>
   1526                 "log-scaled.")<br>
   1527<br>
<br>
<br>
Douglas Rudd<br>
Scientific Computing Consultant<br>
Research Computing Center<br>
<a href="mailto:drudd@uchicago.edu">drudd@uchicago.edu</a><br>
<br>
<br>
<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>
</blockquote></div><br></div>