![](https://secure.gravatar.com/avatar/4bc5fbe7a7d934d16c9ac5c03d816714.jpg?s=120&d=mm&r=g)
Thanks Matt. This kind of worked. The region I want to project is smaller than the entire simulation domain on the face of the projection. When I made the projection, it left the projected region the same size relative to the entire simulation domain and filled in the parts of the domain not projected with white space. Is there a way I can trim the white space, or rather have add_projection size the projection to fit the plotting space? I've attached an image to show you what I mean. Thanks so much! Christine
![](https://secure.gravatar.com/avatar/b279d746f54e2cd6062e8279a767c4bc.jpg?s=120&d=mm&r=g)
Hi Christine, If you're using the plot collection, you can do this: pc.set_width(0.3, '1') for instance, and it will set the width to be 0.3 in code units. If you want finer grained control you can do: p = pc.add_projection(...) p.set_xlim(min_pixel_x, max_pixel_x) p.set_ylim(min_pixel_y, max_pixel_y) where the 'pixel' means that it's x,y in the pixel plane. Does that do what you're looking for? -Matt On Mon, Aug 9, 2010 at 10:43 AM, Christine Simpson <csimpson@astro.columbia.edu> wrote:
Thanks Matt.
This kind of worked. The region I want to project is smaller than the entire simulation domain on the face of the projection. When I made the projection, it left the projected region the same size relative to the entire simulation domain and filled in the parts of the domain not projected with white space. Is there a way I can trim the white space, or rather have add_projection size the projection to fit the plotting space?
I've attached an image to show you what I mean.
Thanks so much!
Christine
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
![](https://secure.gravatar.com/avatar/b279d746f54e2cd6062e8279a767c4bc.jpg?s=120&d=mm&r=g)
Hi Christine, As a quick note, replying to a month old conversation, I've added an "add_thin_projection" method to the plot collection. This accepts a "thickness" argument, which I think will do what you're looking for. (The older recipe is still a bit more flexible, but I think everybody likes it when there are fewer hoops to jump through for common things!) Best, Matt PS As Jeff noted in his email last week, we're moving off subversion, so this will only be in hg. If you're using the install script, we're working to update it to have the mercurial installation option and hopefully an email about that will go out this week. On Mon, Aug 9, 2010 at 10:43 AM, Christine Simpson <csimpson@astro.columbia.edu> wrote:
Thanks Matt.
This kind of worked. The region I want to project is smaller than the entire simulation domain on the face of the projection. When I made the projection, it left the projected region the same size relative to the entire simulation domain and filled in the parts of the domain not projected with white space. Is there a way I can trim the white space, or rather have add_projection size the projection to fit the plotting space?
I've attached an image to show you what I mean.
Thanks so much!
Christine
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (2)
-
Christine Simpson
-
Matthew Turk