Setting color to text from a colormap
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ahmed Abdulla
am 3 Jul. 2020
Beantwortet: Monisha Nalluru
am 8 Jul. 2020
I have generated the following figure, the numbers are the correlatios from the scatter plot, i was thinking of changing the colour of the numbers to be representative of the correlation.
I used the following to display the correlations:
subplot_tight(numCols,numCols,N)%,axis square;
A=round(corr(Long_Lat_Data(:,i),Long_Lat_Data(:,j)),3); %rounding the correlation value to 3 decimal places to save space on plot
set(gca,'XTick',[])
set(gca,'YTick',[])
str = {A};
% axis([0 2 0 2])
t = text(0.2,0.5,str);
t(1).FontSize = 8;
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/326183/image.jpeg)
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Orange finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!