[yt-svn] commit/yt-doc: Elizabeth Tasker: added description of how to set x and y axes ranges to Visualising Data section of docs

Bitbucket commits-noreply at bitbucket.org
Fri Dec 2 10:42:04 PST 2011


1 new commit in yt-doc:


https://bitbucket.org/yt_analysis/yt-doc/changeset/586e814b5be4/
changeset:   586e814b5be4
user:        Elizabeth Tasker
date:        2011-12-02 19:32:16
summary:     added description of how to set x and y axes ranges to Visualising Data section of docs
affected #:  1 file

diff -r ae431055ab4b6795e3d7b607ee4f83ae9dec4921 -r 586e814b5be4d623ed65c51ce76a774c1b8f82f1 source/visualizing/plots.rst
--- a/source/visualizing/plots.rst
+++ b/source/visualizing/plots.rst
@@ -117,8 +117,7 @@
 face-on images of disks and other objects, as well as a rotational slices.
 They work just like slices in other ways, but they tend to be a bit slower.
 
-You can add an oblique slice to a plot collection using
-:meth:`~yt.visualization.plot_collection.PlotCollection.add_cutting_plane`,
+You can add an oblique slice to a plot collection using :meth:`~yt.visualization.plot_collection.PlotCollection.add_cutting_plane`,
 which accepts as its arguments the field and the normal vector to the desired
 plane.  If we wanted to cut through the simulation with a normal vector of
 [0.4, 0.1, 0.9] we would call the method with these arguments:
@@ -150,17 +149,25 @@
 slices of different quantities -- and set the viewport for all of them with a
 single command.
 
+In the case of profiles, it is also useful to be able to manually select the axes range. By default, ``yt`` will automatically select a plot axes range suitable for the data being displayed, but if you wish to override this (for instance, to ensure a time sequence of plots remain on the same scale), you can use:
+
+.. code-block:: python
+
+   p = pc.add_profile_object(my_galaxy, ["Density", "Temperature"])
+   p.set_xlim(1e-25, 1e-20)
+   p.set_ylim(1e3, 1e8)
+
+For images, the colorbar can be adjusted similarly to the above with :meth:`~yt.visualization.plot_collection.PlotCollection.set_zlim`. Labels can be set with :meth:`~yt.visualization.plot_collection.PlotCollection.set_label`
+and color maps can be changed with
+:meth:`~yt.visualization.plot_collection.PlotCollection.set_cmap`.  There are
+several other modifications that can be made, as discussed in the documentation
+for :class:`~yt.visualization.plot_collection.PlotCollection`.
+
 In addition, and as discussed in :ref:`callbacks`, a number of modifications
 can be made to a plot.  This includes velocit vectors, contours, particle
 plotting, and so on.
 
-Colorbars can be adjusted with
-:meth:`~yt.visualization.plot_collection.PlotCollection.set_zlim`, labels can
-be set with :meth:`~yt.visualization.plot_collection.PlotCollection.set_label`
-and color maps can be changed with
-:meth:`~yt.visualization.plot_collection.PlotCollection.set_cmap`.  There are
-several other modifications that can be made, as discussed in the documentation
-for :class:`~yt.visualization.plot_collection.PlotCollection`.
+
 
 .. _how-to-make-1d-profiles:

Repository URL: https://bitbucket.org/yt_analysis/yt-doc/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list