|
From: Tammo H. <Pu...@Ta...> - 2006-01-26 14:29:23
|
How about you split the curve up into section?
Try this:
f(x) = sin(x)
set xrange [0:pi]
plot x<=pi/4 ? f(x) : 1/0 with lines lt 0,\
x>pi/4 && x<=pi/2 ? f(x) : 1/0 with lines lt 1,\
x>pi/2 && x<=3*pi/4 ? f(x) : 1/0 with lines lt 2,\
x>3*pi/4 && x<=pi ? f(x) : 1/0 with lines lt 3
This should get you started.
Tammo
On 26 Jan 2006 at 4:37, chedly ghedira wrote:
>
> Hello,
> i want to plot a curve with different colors. For example, if the Xrange is [0:500], i want that
> between [0:100] the curve is in red (for example), between [100:200] the curve is in green,
> between [200:300] the curve is in red again... and so on.
> How can i do this?
> thank you
|