Effacer les filtres
Effacer les filtres

Reverting the caxis index

2 vues (au cours des 30 derniers jours)
federico nutarelli
federico nutarelli le 1 Juil 2021
Modifié(e) : Yazan le 1 Juil 2021
Hi all, I have made the following image (displayed). I would like the caxi to be inverted, i.e. min = 0.4 and max = 0.1. So the axis should be something like:
0.1
0.15
0.2
0.25
0.3
0.35
0.4
Ideally the code should look as follows:
caxis('manual')
caxis([round(max(auc_weighted.AUC_weighted_new),1) round(min(auc_weighted.AUC_weighted_new),1)])
Is it possible to do so?
I thought about reverting the sign but then I would like the minus sign not to display in the image...
Thank you,
Federico
  5 commentaires
Yazan
Yazan le 1 Juil 2021
Modifié(e) : Yazan le 1 Juil 2021
It is pretty straightforward to invert the colormap. Just insert this in your code:
myColorMap = flipud(hsv2rgb(hsv1));
federico nutarelli
federico nutarelli le 1 Juil 2021
Thanks it works

Connectez-vous pour commenter.

Réponses (1)

Scott MacKenzie
Scott MacKenzie le 1 Juil 2021
Modifié(e) : Scott MacKenzie le 1 Juil 2021
To reverse the order of colors, just change
colormap(myColorMap);
to
colormap(flipud(myColorMap));

Catégories

En savoir plus sur Blue dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by