[yt-users] set_zlim in phase plot

Chang-Goo Kim cgkim at astro.princeton.edu
Mon May 12 15:20:41 PDT 2014


Hi Nathan,

I updated yt, and found that this issue made a mistake on handling
filename. For normal string as an input for save function, it didn't set
"prefix" and returned an error. Error message is attached below.

Chang-Goo

==

File
"/tigress/changgoo/yt-x86_64/src/yt-hg/yt/visualization/profile_plotter.py",
line 776, in save
    fn = "%s_%s%s" % (prefix, middle, suffix)
UnboundLocalError: local variable 'prefix' referenced before assignment




On Sun, May 11, 2014 at 5:48 PM, Nathan Goldbaum <nathan12343 at gmail.com>wrote:

> Hi Chang-Goo,
>
> Thanks for the report.  I've issued a pull request to fix this issue
> (among others) here:
>
> https://bitbucket.org/yt_analysis/yt/pull-request/896/plotting-cleanup
>
> Hope that's helpful,
>
> -Nathan
>
>
> On Thu, May 8, 2014 at 1:15 PM, Chang-Goo Kim <cgkim at astro.princeton.edu>wrote:
>
>> Hi all,
>>
>> set_zlim didn't readjust colormap scale. Here's my simple code and
>> resulting figure. Note that I have tried to reset color scale with
>> set_zlim, but the range remains the same. What did I miss?
>>
>> dd=pf.all_data()
>>
>> ph=PhasePlot(dd,'nH','pok',['cell_mass'],weight_field=None,x_bins=64,y_bins=64,fractional=True)
>> ph.set_zlim('cell_mass',1.e-5,1)
>> ph.show()
>> ph.save('phaseplot.png')
>>
>>
>> http://i.imgur.com/aZ2v7XJ.png
>>
>>
>> BTW, thanks for recent update for fractional keyword. Now, the fractional
>> keyword gives exactly what I want.
>>
>> Chang-Goo
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140512/b722c654/attachment.html>


More information about the yt-users mailing list