ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 07 Jan 2020 09:15:25 -0600inset() and multi_graphics() are not definedhttp://ask.sagemath.org/question/49410/inset-and-multi_graphics-are-not-defined/ Hi
I am trying to plot two graphics beside each other, in a way that one of them which is smaller is on the upper left side of the other. I tried to run examples of both inset and multi_graphics on sagemath website. But I receive the error of "AttributeError: 'GraphicsArray' object has no attribute 'inset'" for inset, and the error of "NameError: name 'multi_graphics' is not defined" for multi_graphics.
I put my codes below:
Inset:
------
import matplotlib
G = graphics_array([plot(sin, (0, 2*pi)),plot(cos, (0, 2*pi))])
c = circle((0,0), 1, color='red', thickness=2, frame=True)
G.inset(c)
The error:
Error in lines 6-6
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1191, in execute
flags=compile_flags), namespace, locals)
File "", line 1, in <module>
AttributeError: 'GraphicsArray' object has no attribute 'inset'
multi_graphics:
g1 = plot(sin(x), (x, -10, 10), frame=True)
g2 = EllipticCurve([0,0,1,-1,0]).plot(color='red', thickness=2,axes_labels=['$x$', '$y$']) + text(r"$y^2 + y = x^3 - x$", (1.2, 2), color='red')
g3 = matrix_plot(matrix([[1,3,5,1], [2,4,5,6], [1,3,5,7]]))
G = multi_graphics([(g1, (0.125, 0.65, 0.775, 0.3)),(g2, (0.125, 0.11, 0.4, 0.4)),(g3, (0.55, 0.18, 0.4, 0.3))])
G
The error:
Error in lines 4-4
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1191, in execute
flags=compile_flags), namespace, locals)
File "", line 1, in <module>
NameError: name 'multi_graphics' is not defined
I'm working on CoCalc (SageMathCloud) on its unpaid trial server.
---------------ssssTue, 07 Jan 2020 09:15:25 -0600http://ask.sagemath.org/question/49410/connecting plots by lineshttp://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 -0500http://ask.sagemath.org/question/38845/