[yt-users] PlotCollection questions

Francia Riesco ff2214 at columbia.edu
Wed May 22 07:11:24 PDT 2013


        Hello Everybody,
      first I want to thank for every time I got an answer when I write 
here, I really appreciate it.
Now I am writing because I am using PlotCollection (As you can see my 
code) and I have some  questions

1) the plot is coming in cm^3 and I want to change it to kpc^3 is there 
a way to change it?
2) I am attaching the plot can I change to dot or any different symbol 
and color?
3) why some plot come "empty"? and also I get this error message
/Data has no positive values, and therefore can not be log-scaled./

-----
sphere = pf.h.sphere(c, (250., 'kpc')) # 250.
levels = 8 #8
mi, ma = sphere.quantities["Extrema"]("Density")[0]
contour_values, connected_sets = 
sphere.extract_connected_sets("Density", levels, mi, ma)
for i in connected_sets:
     eb       =  connected_sets[i]
     print "level  " + str(i) + " clmsp# " + str(len(eb))
     for j in eb:
         obj = eb[j]
         com = obj.quantities["CenterOfMass"]()
         print com
         pc = PlotCollection(pf, com)
         pc.add_profile_object(obj, ["Density", 
"Temperature"],weight="CellMassMsun") # average T(rho)
         pc.add_profile_object(obj, ["Density", "CellVolume"], 
weight=None) #
         pc.add_profile_object(obj, ["Density", "CellMassMsun"], 
weight=None) #
         try:
           pc.save("sliceplot_300_"+str(i)+"_" +str(j))
         except Exception, e:
            print e
            continue

-----

Thank you in advance!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130522/680e0309/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sliceplot_305_1_Profile1D_1_Density_CellVolume.png
Type: image/png
Size: 28784 bytes
Desc: not available
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130522/680e0309/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sliceplot_305_23_Profile1D_1_Density_CellVolume.png
Type: image/png
Size: 15180 bytes
Desc: not available
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130522/680e0309/attachment-0001.png>


More information about the yt-users mailing list