Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to control layouts of individual plots within a graphics_array?

I am trying to plot two graphics side-by side from with an '@interact' function within the Sage notebook.

I define my graphics array and render it with the appropriate size as follows:

myGraphicsArray = graphics_array([myPlot1, myPlot2]) myGraphicsArray.show(figsize=[14,5])

This is fine, but how can I control features of the individual plots separately? (e.g. axis range, aspect ratio, maybe even relative sizes of the two plots etc.)

For now I have found a kludge workaround, which is to .show() the individual plots first of all (making them very small) within which I set the relevant layout parameters as follows:

myPlot1.show(ymin=-40,ymax=10,figsize=0.1) # note small figsize myPlot2.show(xmin=-axisMax, xmax=axisMax, ymin=-axisMax, ymax=axisMax, aspect_ratio=1, figsize=0.1) # note small figsize

This is not ideal, as it plots them (albeit small) when I didn't really want to. But at least it allows me to control their respective layouts when they later appear within the graphics_array.

But is there a better way to do this?

How to control layouts of individual plots within a graphics_array?

I am trying to plot two graphics side-by side from with an '@interact' function within the Sage notebook.

I define my graphics array and render it with the appropriate size as follows:

myGraphicsArray = graphics_array([myPlot1, myPlot2]) myGraphicsArray.show(figsize=[14,5])

This is fine, but how can I control features of the individual plots separately? (e.g. axis range, aspect ratio, maybe even relative sizes of the two plots etc.)

For now I have found a kludge workaround, which is to .show() the individual plots first of all (making them very small) within which I set the relevant layout parameters as follows:

myPlot1.show(ymin=-40,ymax=10,figsize=0.1) # note small figsize figsize

myPlot2.show(xmin=-axisMax, xmax=axisMax, ymin=-axisMax, ymax=axisMax, aspect_ratio=1, figsize=0.1) # note small figsize

This is not ideal, as it plots them (albeit small) when I didn't really want to. But at least it allows me to control their respective layouts when they later appear within the graphics_array.

But is there a better way to do this?

How to control layouts of individual plots within a graphics_array?

I am trying to plot two graphics side-by side from with an '@interact' function within the Sage notebook.

I define my graphics array and render it with the appropriate size as follows:

myGraphicsArray = graphics_array([myPlot1, myPlot2]) myPlot2])

myGraphicsArray.show(figsize=[14,5])

This is fine, but how can I control features of the individual plots separately? (e.g. axis range, aspect ratio, maybe even relative sizes of the two plots etc.)

For now I have found a kludge workaround, which is to .show() the individual plots first of all (making them very small) within which I set the relevant layout parameters as follows:

myPlot1.show(ymin=-40,ymax=10,figsize=0.1) # note small figsize

myPlot2.show(xmin=-axisMax, xmax=axisMax, ymin=-axisMax, ymax=axisMax, aspect_ratio=1, figsize=0.1) # note small figsize

This is not ideal, as it plots them (albeit small) when I didn't really want to. But at least it allows me to control their respective layouts when they later appear within the graphics_array.

But is there a better way to do this?

click to hide/show revision 4
No.4 Revision

How to control layouts of individual plots within a graphics_array?

I am trying to plot two graphics side-by side from with an '@interact' function within the Sage notebook.

I define my graphics array and render it with the appropriate size as follows:

myGraphicsArray = graphics_array([myPlot1, myPlot2])

myGraphicsArray.show(figsize=[14,5])

myPlot2]) myGraphicsArray.show(figsize=[14,5])

This is fine, but how can I control features of the individual plots separately? (e.g. axis range, aspect ratio, maybe even relative sizes of the two plots etc.)

For now I have found a kludge workaround, which is to .show() the individual plots first of all (making them very small) within which I set the relevant layout parameters as follows:

myPlot1.show(ymin=-40,ymax=10,figsize=0.1) # note small figsize

figsize myPlot2.show(xmin=-axisMax, xmax=axisMax, ymin=-axisMax, ymax=axisMax, aspect_ratio=1, figsize=0.1) # note small figsize

figsize

This is not ideal, as it plots them (albeit small) when I didn't really want to. But at least it allows me to control their respective layouts when they later appear within the graphics_array.

But is there a better way to do this?