<div dir="ltr"><div>These both sound like bugs. Can you please open two issues on github so we don't lose track? Please also use datasets from <a href="http://yt-project.org/data">yt-project.org/data</a> or include links to outputs so we can reproduce the issues locally.<br><br></div>-Nathan<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 6, 2017 at 3:59 PM, Stephanie Tonnesen <span dir="ltr"><<a href="mailto:stonnes@gmail.com" target="_blank">stonnes@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">Hi yt-users!<div><br></div><div>I have two ProfilePlot issues.  I have updated to yt version 3.5 dev0 to try and get the standard_error on a ProfilePlot, but now am running into other problems.  Basically, I am trying to get the same result two ways, and have run into two problems.</div><div><br></div><div>1)  The linewidth call no longer works.  This code worked in my old yt version, but now gives me an error unless I take out the linewidth command:</div><div><br></div><div><div>profiles = []</div><div>labels = []</div><div>plot_specs = []</div><div>linest = ['-','--','-.','-','--']</div><div>cols = ['red','red','red','green','<wbr>green']</div><div>lws = ['2','2','2','2','2']</div><div><br></div><div>i =0</div><div>while i < len(loop):</div><div>    ds = yt.load("/mnt/ceph/users/<wbr>stonnesen/data1/"+loopfile[i]+<wbr>"/DD"+loop[i]+"/"+loopfile[i]+<wbr>loop[i])</div><div>    disk = ds.disk([0.5,0.5,0.5],[0,0,-1.<wbr>0],(40,"kpc"),(2,"kpc"))</div><div><br></div><div><br></div><div>    profiles.append(yt.create_<wbr>profile(</div><div>    data_source=disk,</div><div>    bin_fields=["radius"],</div><div>    fields=["density"],</div><div>    n_bins=52,</div><div>    units=dict(radius="kpc",</div><div>               density="g/cm**3"),</div><div>    logs=dict(radius=False),</div><div>    weight_field='ones',</div><div>    extrema=dict(radius=(0,40)),</div><div>    ))</div><div>    labels.append("%s" % looptext[i])</div><div>    plot_specs.append(dict(<wbr>linestyle=linest[i],linewidth=<wbr>lws[i],color=cols[i]))</div><div>    </div><div>    </div><div>    i = i+1</div><div><br></div><div>plot = yt.ProfilePlot.from_profiles(<wbr>profiles,labels=labels,plot_<wbr>specs=plot_specs)</div><div>plot.set_ylim('density',1e-27,<wbr>1e-22)</div><div>plot.save()</div></div><div><div><br></div><div>I get this error:</div><div><div>yt : [INFO     ] 2017-11-06 16:44:12,585 Gathering a field list (this may take a moment.)</div><div>Traceback (most recent call last):</div><div>  File "yt_diskprofile_oplotdiffruns.<wbr>py", line 61, in <module></div><div>    plot = yt.ProfilePlot.from_profiles(<wbr>profiles,labels=labels,plot_<wbr>specs=plot_specs)</div><div>  File "/mnt/home/stonnesen/yt-conda/<wbr>yt/yt/visualization/profile_<wbr>plotter.py", line 443, in from_profiles</div><div>    return cls._initialize_instance(obj, profiles, labels, plot_specs, y_log)</div><div>  File "/mnt/home/stonnesen/yt-conda/<wbr>yt/yt/visualization/profile_<wbr>plotter.py", line 393, in _initialize_instance</div><div>    obj._setup_plots()</div><div>  File "/mnt/home/stonnesen/yt-conda/<wbr>yt/yt/visualization/profile_<wbr>plotter.py", line 355, in _setup_plots</div><div>    label=self.label[i], **self.plot_spec[i])</div><div>  File "/mnt/xfs1/home/stonnesen/yt-<wbr>conda/lib/python3.6/site-<wbr>packages/matplotlib/__init__.<wbr>py", line 1710, in inner</div><div>    return func(ax, *args, **kwargs)</div><div>  File "/mnt/xfs1/home/stonnesen/yt-<wbr>conda/lib/python3.6/site-<wbr>packages/matplotlib/axes/_<wbr>axes.py", line 1437, in plot</div><div>    for line in self._get_lines(*args, **kwargs):</div><div>  File "/mnt/xfs1/home/stonnesen/yt-<wbr>conda/lib/python3.6/site-<wbr>packages/matplotlib/axes/_<wbr>base.py", line 404, in _grab_next_args</div><div>    for seg in self._plot_args(this, kwargs):</div><div>  File "/mnt/xfs1/home/stonnesen/yt-<wbr>conda/lib/python3.6/site-<wbr>packages/matplotlib/axes/_<wbr>base.py", line 394, in _plot_args</div><div>    seg = func(x[:, j % ncx], y[:, j % ncy], kw, kwargs)</div><div>  File "/mnt/xfs1/home/stonnesen/yt-<wbr>conda/lib/python3.6/site-<wbr>packages/matplotlib/axes/_<wbr>base.py", line 301, in _makeline</div><div>    seg = mlines.Line2D(x, y, **kw)</div><div>  File "/mnt/xfs1/home/stonnesen/yt-<wbr>conda/lib/python3.6/site-<wbr>packages/matplotlib/lines.py", line 396, in __init__</div><div>    self.set_linestyle(linestyle)</div><div>  File "/mnt/xfs1/home/stonnesen/yt-<wbr>conda/lib/python3.6/site-<wbr>packages/matplotlib/lines.py", line 1115, in set_linestyle</div><div>    self._us_dashOffset, self._us_dashSeq, self._linewidth)</div><div>  File "/mnt/xfs1/home/stonnesen/yt-<wbr>conda/lib/python3.6/site-<wbr>packages/matplotlib/lines.py", line 69, in _scale_dashes</div><div>    scaled_offset = offset * lw</div><div>TypeError: can't multiply sequence by non-int of type 'float'</div><div><br></div><div><br></div><div>2)  the plot copying the cookbook example (<a href="http://yt-project.org/doc/cookbook/simple_plots.html?highlight=profileplot%20standard%20deviation" target="_blank">http://yt-project.org/doc/<wbr>cookbook/simple_plots.html?<wbr>highlight=profileplot%<wbr>20standard%20deviation</a>) is giving me 0s and nans instead of the correct values:</div><div><br></div><div><div>profiles = []</div><div>labels = []</div><div>plot_specs = []</div><div>linest = ['-','--','-.','-','--']</div><div>cols = ['red','red','red','green','<wbr>green']</div><div>lw = ['2','2','2','2','2']</div><div><br></div><div>i =0</div><div>while i < len(loop):</div><div>    ds = yt.load("/mnt/ceph/users/<wbr>stonnesen/data1/"+loopfile[i]+<wbr>"/DD"+loop[i]+"/"+loopfile[i]+<wbr>loop[i])</div><div>    disk = ds.disk([0.5,0.5,0.5],[0,0,-1.<wbr>0],(40,"kpc"),(2,"kpc"))</div><div>    </div><div>    prof = yt.create_profile(disk,'<wbr>radius',('gas','density'), units={'radius':'kpc'}, extrema={'radius':((0.0,'kpc')<wbr>,(40.0,'kpc'))},weight_field='<wbr>ones')</div><div>    </div><div>    radius = prof.x</div><div>    mean = prof['gas','density']</div><div>    std = prof.standard_deviation['gas',<wbr>'density']</div><div>    plt.semilogy(radius,mean,<wbr>color=cols[i])#,linewidth=lw[<wbr>i],linestyle=linest[i])</div><div>    print (mean)</div><div>    print (radius)</div><div>    </div><div>    labels.append("%s" % looptext[i])</div><div>    i = i+1</div><div><br></div><div>plt.ylim(1e-27,1e-21)</div><div>plt.xlabel('r (kpc)')</div><div>plt.ylabel(r'density')</div><div>plt.legend()</div><div>plt.savefig('density_profiles_<wbr>gasmassmatch.png')</div><div>plt.clf()</div><div><br></div></div><div>The mean values are all zero, and the radius values are all nan. The code will finish (unless I use the linewidth command), but of course the plots have nothing on them!!</div><div><br></div><div>Any ideas for these issues?  I would be happy to send my full scripts or output files. </div><div><br></div><div>Thanks!</div><div>Stephanie</div><div><br></div><div><div class="m_-6722959640739144651gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><font face="garamond,serif">--<br>Dr. Stephanie Tonnesen<br></font></div></div><div><font face="garamond,serif">Associate Research Scientist</font></div><div><font face="garamond,serif">CCA, Flatiron Institute</font></div><div><font face="garamond,serif">New York, NY</font></div><font face="garamond,serif"><br></font></div><font face="garamond,serif"><a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a><br></font></div></div></div></div></div></div></div>
</div></div></div>
<br>______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
<br></blockquote></div><br></div>