hi everyone,

I am trying to use the function ParticlePhasePlot to plot particles' 
quantities. However, some unexpected results come out.

I tried to plot (x-R-"d2center" , y-\Phi-"d2phi" , z-R-"d2center"), and the 
particles are colored by z-R-"d2center".
Ideally, the color should vary monotonically along the x-axis, since the z - R 
is equal to x - R
But the output figure shows that there are particles colored with red dispersed 
in the full figure.

to see the output:
https://github.com/yt-project/yt/issues/4887#issue-2268458159

I do not know why this happens and could you please give me some suggestions, 
thanks a lot!

Here is the code:
##################### CODE ########################
import yt
from yt.frontends import boxlib
from yt.frontends.boxlib.data_structures import AMReXDataset
import numpy as np

rootdir="./Output"
ds = AMReXDataset(rootdir+'/Plt00000')

ptc_xname="d2center"
ptc_yname="d2phi"
ptc_zname="d2center"
ptc_cmapname = "hsv"
ptcslc = yt.ParticlePhasePlot(
    ds,
    ptc_xname,
    ptc_yname,
    [ptc_zname],
    x_bins=800,
    y_bins=800,
)
ptcslc.set_log(ptc_xname,False)
ptcslc.set_log(ptc_yname,False)
ptcslc.set_log(ptc_zname,False)
ptcslc.set_cmap(("particles", ptc_zname), ptc_cmapname)
ptcslc.set_zlim(("particles", ptc_zname), 0.04, 0.065)
ptcslc.save("testPTC")
##################### CODE ########################

best wishes,
Yifeng He
_______________________________________________
yt-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/yt-users.python.org/
Member address: [email protected]

Reply via email to