How can I add a diagonal gradient and corresponding colorbar to a plot?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Halle Berger
am 17 Sep. 2019
Kommentiert: Halle Berger
am 29 Okt. 2019
This is what I'd like to create with my own data, how can I add that gradient and colorbar to my plot
0 Kommentare
Akzeptierte Antwort
darova
am 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
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Color and Styling 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!