scatter 2d plot with value in color
Ältere Kommentare anzeigen
clear
x=1:5;
y=1:6;
data=linspace(1,300,30);
figure()
scatter(x,y,[],data,'filled')
colorbar
colormap jet
xlabel('x')
ylabel('y')
Hi I am trying to plot a 2D scatter, each point's coordinate is in the vectors x and y, so there are total 5 times 6 30 points, and their value is the vector data. I want to a 2D plot with value show in the color
And if I use meshgrid(x,y), how make it 5 x 6, not a 6 x 5 matrix
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Color and Styling finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
