[yt-users] plotting questions
Matthew Turk
matthewturk at gmail.com
Tue Nov 24 08:44:00 PST 2009
Hi Shankar,
> My simulation box is 200 Mpc/h. I wanted to know what are the default span (length scales) for the 2 methods ?
> For plot 1, how can I control the spacing of contours ? And where is plot 1 centered at ?
It took me a moment to track down what's happening. The default
length scale is "unitary" -- which is the entire domain. However, the
difference between the two plots is because plot collection-mediated
plots default to being periodic, and this will reset . I have changed
it so that the behavior between the two plot generation mechanisms is
identical, in r1543. However, if you do not wish to upgrade, you can
feed the argument "periodic=True" to the get_slice_plot call.
> For plot 2, it is centered at the most dense point in the box. But how can I add density contours ? Also, how to control the spacing ?
You can add density contours the same way you did for the first
mechanism -- through the modify["contours"] call. :) You can control
the spacing a couple ways, as mentioned in the manual:
http://yt.enzotools.org/doc/advanced/callbacks.html#available-callbacks
through the ncont, clim, and take_log functions. If you look at the
source code, you can see that ncont is fed directly to the matplotlib
contour command -- so you can get greater control by feeding it, for
instance, a list of density contours. Note that the mechanism for
log-spaced contours is to log the data, not request log-spaced
contours, so you will have to keep that in mind if you choose to
request specific contour levels.
-Matt
More information about the yt-users
mailing list