[yt-users] Plot of domain subset

Nathan Goldbaum nathan12343 at gmail.com
Thu May 22 10:32:31 PDT 2014


Hi Yuan,

It's not possible right now to supply a data source to SlicePlot.  It's
definitely something that would be nice to have, though.

If what you are trying to do is amenable to taking a projection instead of
a slice, you might try using ProjectionPlot, which does support data
sources:

prj = ProjectionPlot(pf, 'x', 'dens', data_source=sph)

Nathan

On Thursday, May 22, 2014, Juan Camilo Ibanez Mejia <jibanezmejia at amnh.org>
wrote:

>  Hi yt users,
>
>  I wanted to know if it is possible somehow to make plots (projections
> and slices) of a subregion of the domain, e.g. I define a sphere like :
>
>  sph= pf.h.sphere(center=[0,0,0], radius=(100,'pc’))
>
>  Now I want to plot the projection of the density of that region in the x
> axis:
>
>  slc = SlicePlot(sph, 'x', 'dens')
>
>  But then I get the following error:
>
>  AttributeError: 'AMRSphere' object has no attribute 'domain_width'
>
>  thanks for your help,
>
>  Juan
>
>
>
>  _____________________________
>  Juan Camilo Ibañez Mejia
> Department of Astrophysics
> American Museum of Natural History
> +1-212-313-7435
> jibanezmejia at amnh.org<javascript:_e(%7B%7D,'cvml','jibanezmejia at amnh.org');>
> _____________________________
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140522/f0d2f2e1/attachment.html>


More information about the yt-users mailing list