Hi Yuan,<div><br></div><div>It's not possible right now to supply a data source to SlicePlot.  It's definitely something that would be nice to have, though.</div><div><br></div><div>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:</div>
<div><br></div><div>prj = ProjectionPlot(pf, 'x', 'dens', data_source=sph)</div><div><br></div><div>Nathan<span></span><br><br>On Thursday, May 22, 2014, Juan Camilo Ibanez Mejia <<a href="mailto:jibanezmejia@amnh.org">jibanezmejia@amnh.org</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word">
Hi yt users,
<div><br>
</div>
<div>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 :</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"></span>sph= pf.h.sphere(center=[0,0,0], radius=(100,'pc’))</div>
<div><br>
</div>
<div>Now I want to plot the projection of the density of that region in the x axis:</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"></span>slc = SlicePlot(sph, 'x', 'dens')</div>
<div><br>
</div>
<div>But then I get the following error:</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"></span><span style="font-size:14px;line-height:17.603300094604492px;white-space:pre-wrap;color:rgb(139,0,0)">AttributeError</span><span style="background-color:rgb(255,255,255);font-size:14px;line-height:17.603300094604492px;white-space:pre-wrap">:
 'AMRSphere' object has no attribute 'domain_width'</span></div>
<div><br>
</div>
<div>thanks for your help,</div>
<div><br>
</div>
<div>Juan</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
<div>
<div>_____________________________</div>
<div>
<div>Juan Camilo Ibañez Mejia</div>
<div>Department of Astrophysics</div>
<div>American Museum of Natural History</div>
<div>+1-212-313-7435</div>
<div><a href="javascript:_e(%7B%7D,'cvml','jibanezmejia@amnh.org');" target="_blank">jibanezmejia@amnh.org</a></div>
<div>_____________________________</div>
</div>
</div>
<br>
</div>
</div>

</blockquote></div>