I would like to mark the Minima of my colormap (scatter plot), because the Minima is not directly apparent.
1 view (last 30 days)
Show older comments
%% Plot of the colormap %%
scatter(ff_r,ff_g,10,log10(save),'filled')
xlabel('Fill Factor RED [%]');
ylabel('Fill Factor Green [%]');
grid minor; xlim([0, 100]); ylim([0, 100]);
c = colorbar('eastoutside')
c.Label.String = 'Leistung: log_{10}(P) in [W/m^2]';
axis square;
colormap(cool(17))
how can I extra mark the Minima, for example with e red circle or crose...
I googled for help and found:
set(c, 'Ticks', sort([c.Limits, c.Ticks]))
But I would like to mark the minima and not the Ticks (whatever that should be..).
0 Comments
Answers (1)
Voss
on 13 May 2022
Edited: Voss
on 13 May 2022
% some random data for demonstration:
ff_r = 100*rand(50,1);
ff_g = 100*rand(50,1);
saved_data = rand(50,1);
plotted_data = log10(saved_data);
% mark each point where plotted_data is at its minimum value
% with a red cross:
idx = plotted_data == min(plotted_data);
plot(ff_r(idx),ff_g(idx),'r+','LineWidth',1.5,'MarkerSize',8)
hold on
scatter(ff_r,ff_g,10,plotted_data,'filled')
xlabel('Fill Factor RED [%]');
ylabel('Fill Factor Green [%]');
grid minor; xlim([0, 100]); ylim([0, 100]);
c = colorbar('eastoutside');
c.Label.String = 'Leistung: log_{10}(P) in [W/m^2]';
axis square;
colormap(cool(17))
0 Comments
See Also
Categories
Find more on Colormaps in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!