MATLAB Answers

customized 2D Cartesian plot

조회 수: 42(최근 30일)
BeeTiaw
BeeTiaw 2018년 12월 20일
댓글: BeeTiaw 2018년 12월 20일
Dear expert,
Could anyone help me to customize a Cartesian plot? the problem is as follow:
I have the following dataset which I want to plot into Cartesian axis.
data=[
% x y Temp
0.8470 0.0805 -0.6176
0.8476 0.1598 -0.6179
0.8477 0.2376 -0.6157
0.8471 0.3141 -0.6131
0.8466 0.3894 -0.6156
0.8469 0.4622 -0.6228
0.8477 0.5311 -0.6255
0.8480 0.5953 -0.6130
0.8472 0.6551 -0.5939
0.8461 0.7109 -0.6022
0.8465 0.7612 -0.6653
0.8485 0.8024 -0.7563
0.8492 0.8309 -0.2977
0.8431 0.8456 5.6075
0.8251 0.8494 8.3770
0.7932 0.8479 4.9443
0.7493 0.8462 3.7959
0.6973 0.8463 3.3363
0.6405 0.8475 3.1260
0.5796 0.8480 2.9271
0.5143 0.8475 2.6897
0.4443 0.8467 2.5026
0.3707 0.8467 2.4095
0.2951 0.8473 2.3851
0.2182 0.8478 2.3667
0.1401 0.8475 2.3135
0.0604 0.8469 2.2550];
The first and second colums are the coordinate of a quater-square in {x,y} and the third column is the measurement.
The value in the third column is to be plotted as shown in the figure below.
The "zero" of each "Temp" starts at the boundary of their corresponding {x,y}
How can I achieve this?
Thank you in advance...
  댓글 수: 2
BeeTiaw
BeeTiaw 2018년 12월 20일
Hi Kalyan,
That's correct: to plot (x,y) position in xy plane with temp value.

댓글을 달려면 로그인하십시오.

답변(1개)

KSSV
KSSV 2018년 12월 20일
x = data(:,1) ; y = data(:,2) ; z = data(:,3) ;
figure
plot3(x,y,z);
figure
scatter(x,y,20,z,'filled')
  댓글 수: 1
BeeTiaw
BeeTiaw 2018년 12월 20일
Thanks, but this code does not produce a 2D plot as shown in the example.

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by