2D color dotted plot with three vectors
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Yannick Tabot Njami
el 26 de Mzo. de 2019
Respondida: Yannick Tabot Njami
el 27 de Mzo. de 2019
Hello,
I would like to create a 2D color plot of 3 vectors where X Y and Z is to be color doted for each corresponding pairs of (x,y)
here is my code :
i get the error index exceed matrix dimension . here is an abstract of my data
x = 20 50 80 110 140 170 200 230
y= 20 20 20 20 20 20 20 20
meanv= 58.0194 57.9150 57.7572 57.5733 57.7197 57.7133 58.0707 58.1603![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/210439/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/210439/image.jpeg)
%% Generating the 2D color plot
figure(2)
for N=1:size(plotData,2)
plotData{1,N}.data();
x=plotData{1,N}.data(:,1);
y=20:30:230;
data2plot=plotData{1,N}.data(:,3:end);
pointsize =10;
for i =3:6
scatter(x,y,pointsize,data2plot(:,i))
end
end
1 comentario
KSSV
el 26 de Mzo. de 2019
What for x,y,meanv is given? YOur question is not clear. With what data in hand you want to generate a plot as attached?
Respuesta aceptada
Yannick Tabot Njami
el 26 de Mzo. de 2019
1 comentario
KSSV
el 27 de Mzo. de 2019
The data is not clear......any ways...I assume your problem got solved....
Más respuestas (1)
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!