Question: how to do a point plot if there is a range in value and in different colour

Hi there..

I have a question on how to do a pointplot.

 

before plotting, I need to know the value of lambda[j] and  all the values of lambda already have.

so now I need to plot a graph with the values of lambda with different range and different colour,

 

Let say I have


> for j from 17 to 32 do k[j] := j+1;

x[j] := add(P[j, 1], j = j-1 .. j+2);

X[j] := add(P[j, 1]^2, j = j-1 .. j+2);

y[j] := add(P[j, 2], j = j-1 .. j+2);

Y[j] := add(P[j, 2]^2, j = j-1 .. j+2);

xy[j] := add(P[j, 1]*P[j, 2], j = j-1 .. j+2);

cx[j] := evalf(x[j]/k[j]);

cy[j] := evalf(y[j]/k[j]);

c11[j] := evalf(X[j]/k[j]-cx[j]^2);

c22[j] := evalf(Y[j]/k[j]-cy[j]^2);

c12[j] := evalf(xy[j]/k[j]-cx[j]*cy[j]);

C[j] := evalf(Matrix(2, 2, [[c11[j], c12[j]], [c12[j], c22[j]]]));

E[j] := simplify(fnormal(LinearAlgebra[Eigenvalues](C[j])));

if E[j][1] > E[j][2] then lambda[j] := E[j][2]/(E[j][1]+E[j][2]) else lambda[j] := E[j][1]/(E[j][1]+E[j][2])  end if;

lambda[j];

 end do;

the range of lambda [j] are as follows:

 0.02< lambda [j]<0.06

 0.06< lambda [j]<0.12

 0.12< lambda [j]<0.18

 

for i from 17 to 32, do if   0.02< lambda [j]<0.06 then green[i]:=P[i,j]; j:=i+1 elif

 0.06< lambda [j]<0.12 then red[i]:=P[i,j];j:=i+1 ; elif 0.12< lambda [j]<0.18 then blue[i]:=P[i,j];j:=i+1 end if;end do

how to do a point plot with the above situation so that in my plotting all the information are on the same graph.

 

All help is greatly appreciated.

Thanks

 

 

 

Please Wait...