Change the center position while using plot_2d function.
Hi yt Team, I am not able to change the centre position of the selection while plotting the density from a simulation output file using yt.plot_2d function. It is taking the domain centre as the centre value, even if I change it. I am also not able to change the origin of the output plot as well. Following is the code, please look into it. The output file is from amrvac code. It is the output of a 2.5 MHD code in spherical geometry. My domain centre values are [5.5 1.5707963267948966 0.5] code_length. Basically, r goes from 1 to 10 and theta from 0 to pi. path = "path" file = "filepath" ds = yt.load(file, geometry_override="Spherical_2.5D",parfiles= path + "amrvac.par", units_override = units_override, unit_system="mks") p = yt.plot_2d(ds,("gas","density"),center= [2.0,1.5707963267948966,0],width = (2.0,2.0)) after applying this, my plot range from 4.0 to 6.0 in x direction and from -1.0 to 1.0 in y direction. Please help. Thanks.
Hi there, So unfortunately you're running up against some limitations of the plotting interface with non-cartesian geometries in yt. That center argument will end up entirely ignored for `plot_2d` with non-cartesian data, see the discussion here for more details: https://github.com/yt-project/yt/issues/4841
participants (2)
-
Chris Havlin
-
vashishthanitin5@gmail.com