ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 18 Sep 2017 08:21:55 -0500connecting plots by lineshttps://ask.sagemath.org/question/38845/connecting-plots-by-lines/There are 2 plots in a graphics_array (e.g. sin and cos). How do I "connect" these plots with connecting lines (e.g. a dashed line at angle=pi)?Chris_Mon, 18 Sep 2017 08:21:55 -0500https://ask.sagemath.org/question/38845/How to control layouts of individual plots within a graphics_array?https://ask.sagemath.org/question/8156/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?
deebs67Thu, 09 Jun 2011 03:42:41 -0500https://ask.sagemath.org/question/8156/Why does graph plotting crop so aggressively, and what is a work-around?https://ask.sagemath.org/question/8016/why-does-graph-plotting-crop-so-aggressively-and-what-is-a-work-around/Surely, the Sage community is aware of this bug. For example, there is [this ticket](http://trac.sagemath.org/sage_trac/ticket/7299), in which the problem is supposed to be fixed. But it's not!
A patch is described: in `sage/graphs/graph_plot.py` we can add the line(?)
> `G._extra_kwds['axes_pad']=.05 `
Am I to change this value in order to fix this over-zealous cropping behavior? No matter what I do, in this regard, I still end up with graph vertices partially cut off.
What's the easy work-around? I would like to be able to plot `graphics_array` objects with several graphs (with their vertices clearly shown!).
(http://trac.sagemath.org/sage_trac/ticket/7299)Sammy BlackMon, 21 Mar 2011 08:00:06 -0500https://ask.sagemath.org/question/8016/