I would like to mark the Minima of my colormap (scatter plot), because the Minima is not directly apparent.

1 visualización (últimos 30 días)
%% 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..).

Respuestas (1)

Voss
Voss el 13 de Mayo de 2022
Editada: Voss el 13 de Mayo de 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))

Categorías

Más información sobre Colormaps en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by