Plotting a 2-d graph
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Wafa'a Shanti
am 27 Dez. 2017
Kommentiert: Wafa'a Shanti
am 30 Dez. 2017
Is it possible to make a plot with three variables, but using only ta 2-D plot? For instance, I want the x-axis to be time, y-axis to be height, and the independent variable to be temperature. I haven't found anything online that would hint at a possibility, but thought it wouldn't hurt to ask. Thanks!
0 Kommentare
Akzeptierte Antwort
ANKUR KUMAR
am 27 Dez. 2017
If you want to use 3 variables on 2D plot, then you can use contour or contourf or surf or surfc.
clc
clear
lat=(1:10)';
lon=(1:20)';
rf=randi(20,10,20);
figure()
contourf(lon,lat,rf,'linecolor','none');
figure()
[x,y]=meshgrid(lon,lat);
a=surf(x,y,rf,'FaceAlpha',0.5,'EdgeColor', 'none')
figure()
surfc(x,y,rf,'FaceAlpha',0.5,'EdgeColor', 'none')
5 Kommentare
ANKUR KUMAR
am 30 Dez. 2017
Bearbeitet: ANKUR KUMAR
am 30 Dez. 2017
If your problem is not resolved yet, then please provide your program, so that we can help you.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Line Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!