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.Fri, 18 Aug 2023 06:46:17 +0200plot with varying color linehttps://ask.sagemath.org/question/72679/plot-with-varying-color-line/Is there a way to plot a complex function of a single real variable
so that the color of the line represents the argument of the
complex function and the vertical position of the line represents
the norm of the complex function.
For example can this be modified so that the color of the line
represents the argument of the function?
f(x) = exp(5*i*x) * exp(-x^2/20) # complex gaussian wave packet
plot(abs(f(x)), x, -10,10) # plot magnitude of the function
Is there anything available along the lines of this:
plot(abs(f(x), x, -10, 10, linecolor = hue(complex_to_hue(f(x))))takashiFri, 18 Aug 2023 06:46:17 +0200https://ask.sagemath.org/question/72679/