Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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(5ix) * exp(-x^2/20)
this defines a complex gaussian wave packet

plot(abs(f(x)), x, -10,10)
this plots the 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))))

plot with varying color line

Is there a way to plot a complex function of a single real variable variable so that the color of the line represents the argument of the the complex function and the vertical position of the line represents represents the norm of the complex function.

For example can this be modified so that the color of the line line represents the argument of the function?

f(x) = exp(5ix) exp(5*i*x) * exp(-x^2/20) 
this defines a # complex gaussian wave packet

packet plot(abs(f(x)), x, -10,10) # plot magnitude of the function

plot(abs(f(x)), x, -10,10)
this plots the magnitude of the function

is Is there anything available along the lines of this:

plot(abs(f(x), x, -10, 10, linecolor = hue(complex_to_hue(f(x))))

hue(complex_to_hue(f(x))))