Ask Your Question

How to control layouts of individual plots within a graphics_array?

asked 2011-06-09 03:42:41 -0500

deebs67 gravatar image

updated 2011-06-09 05:12:23 -0500

kcrisman gravatar image







But is there a better way to do this?

edit retag flag offensive close merge delete


This answer also exists at Unfortunately, I don't think there is a better way for now; graphics_array still needs a fair amount of work. See,, and, for instance.

kcrisman gravatar imagekcrisman ( 2011-06-09 05:17:35 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2011-06-09 05:22:28 -0500

niles gravatar image

You can use myPlot1.set_axes_range to accomplish some of what you want, and I think there are other specific methods for setting particular options--hopefully the ones you're interested in :) Also, additional arguments given to (e.g. axes and aspect_ratio) will be passed to each of the individual plots, so you can use that if there are some options you want to apply to all of the plots.

edit flag offensive delete link more


Thanks for that. The tip about set_axes_range allowed me to remove one of the '' operations. Unfortunately, since I want a different aspect_ratio between the two plots, I couldn't eliminate the other.

deebs67 gravatar imagedeebs67 ( 2011-06-09 06:36:41 -0500 )edit

If you use .save() instead of .show(), do the options still get set for graphics_array?

niles gravatar imageniles ( 2011-06-09 08:32:19 -0500 )edit

Actually, now I've done more experiments I realise that .show() wasn't actually helping me to control the aspect_ratio of myPlot2 within the graphics_array. I thought it did, but it was just that by default it gave me an aspect ratio close to 1.0, which by eye I assumed was exactly 1.0, but it wasn't. So I will get the aspect_ratio I ask for in the .show() operation, but it doesn't seem to influence what I get in the As for .save(), in terms of what I see on the screen, I seem to get the same as .show(). The set_axes_range was the top tip which means that things work well enough for my purposes now without needing any statements. So thanks for that.

deebs67 gravatar imagedeebs67 ( 2011-06-09 09:23:06 -0500 )edit

well, glad I could help; as @kcrisman mentioned, graphics_array is unsatisfactory in many ways . . .

niles gravatar imageniles ( 2011-06-09 10:08:47 -0500 )edit

Your Answer


Add Answer

Question Tools


Asked: 2011-06-09 03:42:41 -0500

Seen: 1,231 times

Last updated: Jun 09 '11