[yt-users] Question in the projection plot

Jun-Hwan Choi jhchoi at pa.uky.edu
Wed Oct 10 08:01:19 PDT 2012


It is nice there is a method what I need.
One more question.
Let say I set pc.add_thin_projection("Density","z",0.4).
Is this thin projection is through z=0 to z=0.4 or z=center-0.2 to 
z=center+02 where the center is define at PlotCollection and/or 
add_thin_projection?

Thank you,
Junhwan
On 10/10/12 00:50, Matthew Turk wrote:
> Hi Nathan and Jun-Hwan,
>
>> Unfortunately, I just tried to create a plot that way and either I'm doing
>> something wrong or there's a bug somewhere that breaks this functionality.
>> I could create the projection object, but when I supplied the projection
>> object as a data source in add_projection, it failed (traceback
>> here:http://paste.yt-project.org/show/2775/). Can someone else on the list
>> let us know if I'm doing something wrong here?
> I think you want to create a region, with pf.h.region, and supply that
> as the data source.  The data_source gets queried from the projection.
>   You could also create field cuts by using an InlineExtractedRegion
> but it's probably easier to do it with a region . So the next result
> would be:
>
> reg = pf.h.region([0.5, 0.5, 0.5], [0.3, 0.0, 0.0], [0.7, 0.0, 0.0])
> pc.add_projection("Density", "x", data_source=reg)
>
> But there's also pc.add_thin_projection which does this for you and
> accepts a 'thickness' argument:
>
> http://yt-project.org/doc/api/generated/yt.visualization.plot_collection.PlotCollection.add_thin_projection.html
>
> So,
>
> pc.add_thin_projection("Density", "z", 0.4)
>
> Hope that helps!
>
> -Matt
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org


-- 
--------------------------------------------------------------
Jun-Hwan Choi, Ph.D.
Department of Physics and Astronomy, University of Kentucky
Tel: (859) 897-6737        Fax: (859) 323-2846
Email: jhchoi at pa.uky.edu   URL: http://www.pa.uky.edu/~jhchoi
--------------------------------------------------------------




More information about the yt-users mailing list