Hi Reju,

SlicePlot does not support the data_source keyword.  Unfortunately, I think it is more difficult to add this to the slicing machinery than it was to add this to projections.  However, you should be able to create something similar to a slice by doing a thin projection.  There are basically two ways you can do this.  The first is to change the ad object from all_data to a region where you specify the width of the region along the axis of the line of sight to be very small.  The second way would be to keep ad the same and add more cuts to the cut_region command.  For example, if you are slicing the x axis, you could add 'grid["x"] > some_value', 'grid["x"] < other_value', to specify the width of the region.  If you then give that data_source to ProjectionPlot, it should give you something quite similar.

Britton


On Mon, Dec 2, 2013 at 10:32 AM, Reju Sam John <rejusamjohn@gmail.com> wrote:
Dear All,

pf = load(fn) # load data
ad = pf.h.all_data()
new_region = ad.cut_region(['grid["Velocity_Div"] >-10.0 ','grid["Velocity_Div"] < -3'])
plot = ProjectionPlot(pf, "z", "Density", weight_field="Density", data_source=new_region)
plot.set_width(20, 'mpc')
plot.save()

With the above code I can produce a ProjectionPlot which only contain  regions of specified condition. I want to the SlicePlot of same, is it possible?

Thanks
--
Reju Sam John

_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org