I would like to mark the Minima of my colormap (scatter plot), because the Minima is not directly apparent.
조회 수: 1 (최근 30일)
이전 댓글 표시
%% 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
답변 (1개)
Voss
2022년 5월 13일
편집: Voss
2022년 5월 13일
% 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
참고 항목
카테고리
Help Center 및 File Exchange에서 Colormaps에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!