ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 16 Jun 2024 18:23:19 +0200Plot real to complex functionhttps://ask.sagemath.org/question/77872/plot-real-to-complex-function/I have a function that has real domain and a complex co-domain. I want to plot the real and imaginary parts together, like this: imgur.com/a/yb7g5Ce
The code that I used to generate that plot (`plot(real(F(x)),(-2,2)) + plot(imag(F(x)),(-2,2),color="red")`) works, but I think every value is being calculated two times, discarding either the real or the imaginary part. Is there any way to get this effect more efficiently, without doing useless calculations?ThePirate42Sun, 16 Jun 2024 18:23:19 +0200https://ask.sagemath.org/question/77872/How can I plot two parametric functions in a common coordinate system?https://ask.sagemath.org/question/60387/how-can-i-plot-two-parametric-functions-in-a-common-coordinate-system/ I can easily use parametric_plot() to plot 1 parametric function at once. For example
parametric_plot((sin(2*t),cos(3*t)),(t,0.0,9),aspect_ratio=1)
plots a nice Lissajous curve.
I also can plot a circle:
parametric_plot((sin(t),cos(t)),(t,0.0,9),aspect_ratio=1)
But how can I plot both of them in a common coordinate system?
I tried:
parametric_plot([(sin(2*t),cos(3*t)),(sin(t),cos(t))],(t,0.0,9),aspect_ratio=1)
Which doesn't work -> Last error message: ''tuple' object is not callable'
I also tried:
pl1=parametric_plot((sin(t),cos(t)),(t,0.0,9),aspect_ratio=1)
pl2=parametric_plot((sin(2*t),cos(3*t)),(t,0.0,9),aspect_ratio=1)
pl1.add_primitive(pl2)
pl1
Error: 'Graphics' object has no attribute 'options'
Then how can I use parametric_plot() to plot two parametric functions at once, in a common coordinate system?
KonstantinWed, 22 Dec 2021 23:45:43 +0100https://ask.sagemath.org/question/60387/Is there a reasonable way to plot arcsec (real) without having a line connecting the branches?https://ask.sagemath.org/question/9104/is-there-a-reasonable-way-to-plot-arcsec-real-without-having-a-line-connecting-the-branches/I'm working on a student exploration of inverse trig functions (interact), and I'd like to plot y=arcsec(x), say from -8 to 8, without having to specify the domain. How do I turn off the spurious line that Sage draws?dasmith88Fri, 22 Jun 2012 13:40:52 +0200https://ask.sagemath.org/question/9104/