I'm trying to do the following in gnuplot: color with gradient an ellipse. Each point of the ellipse has its z-value given by the function
charge_density(t,beta) = -sin(t)*beta*(sqrt(1-(beta**2)))/(1-((sin(t)*beta)**2))
The radius function of the ellipse is given by a similar function:
radius(t,beta) = sqrt(1-(beta**2))/sqrt(1-((sin(t)*beta)**2))
Where beta
is just a parameter satisfying 0<beta<1
, and t
is the angle.
Well, I tried to use the "+"
special file with the lc rgb variable
option, but it doesn't work with polar coordinates.
I also tried the set mapping cylindrical
, but nothing happened.
Is this possible only with cartesian coordinates? In this case, I'll have to do 2 graphics and modify the above functions...
Or will I have to create a data file with angle, radius, z
data?
I'd like to do this with pm3d
and the following palette
:
set palette model RGB defined (-1 "blue", 0 "black", 1 "red")