How can I add a diagonal gradient and corresponding colorbar to a plot?

6 vues (au cours des 30 derniers jours)
Halle Berger
Halle Berger le 17 Sep 2019
Commenté : Halle Berger le 29 Oct 2019
This is what I'd like to create with my own data, how can I add that gradient and colorbar to my plot

Réponse acceptée

darova
darova le 23 Sep 2019
An example:
[X,Y] = meshgrid(1:0.1:3);
Z = X+Y;
pcolor(X,Y,Z)
shading interp
colorbar('Location','NorthOutside')
You can also create your own colormap

Plus de réponses (1)

Jalaj Gambhir
Jalaj Gambhir le 20 Sep 2019
Hi, colormap's can be used to do so. Look at an example here.

Catégories

En savoir plus sur Colormaps dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by