Scatter Plot following a colormap regulation
Show older comments
Hello there,
I have a datasets of positions (attached). Here are my intention:
- Make a scatter plot with different color positions, let's say following "jet" colormap.
- Put the station number also along with the scatter plot. Let's say, the value (number of the respected station shown beside the scatter plot of each station.
Here's my code so far which is failed to follow the jet colormap:
clear all;
clc;
A=dir('*.mat');
numprof = length(A);
couleur = jet(numprof); %prefered colormap is jet
for nn=1:length(A)
filename = A(nn).name;
B = load(filename);
xp = B.T.xpos(1);
yp = B.T.ypos(1);
sta = B.T.station(1);
scatter(xp,yp,50,"square",'filled','color',couleur(nn,:), 'DisplayName', string(sta)); % it seems not following the jet colormap setting
hold on;
end
hlgd = legend('Location','best');
title(hlgd, 'Station Number')
Accepted Answer
More Answers (0)
Categories
Find more on Color and Styling in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
