Hi,

This is indeed odd!  It's possible that the cut region is causing some oddness.  Can you try doing this, and telling us how it looks?

print(dense_ad["ones"].size)

The other thing to look at would be:

dense_ad = ad.cut_region(["obj['Density'] < 0"])
print(dense_ad["ones"].size)

Since that's the complement, we'd expect it to return something.

It's also possible, but I would defer to Britton Smith on this (since he did the cut region work), that the comparison being executed is ignoring units, and potentially silently failing.

On Wed, Sep 2, 2020 at 1:18 PM <fujitaa@shinshu-u.ac.jp> wrote:
Hello,
 data_source in SlicePlot does not work (data_source in ProjectionPlot works). Would you explain how to enable it or fix the problem?

ds= yt.load("../DD2000/jf2000")
ad = ds.all_data()
dense_ad = ad.cut_region(["obj['Density'] >= 0"])
p = yt.SlicePlot(ds, 'x',"density",center=[6.5536/2, 6.5536/2,(15.5/2+2.5)],origin=["lower", "center", "domain"]
                ,data_source=dense_ad )

I chose 0 so that it will pick up all the gas but it does not.

There is no error message. It just does not show anything much in the figure. How can I attach figures here?
_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org
https://mail.python.org/mailman3/lists/yt-users.python.org/
Member address: matthewturk@gmail.com