How can I add a diagonal gradient and corresponding colorbar to a plot?
3 views (last 30 days)
Show older comments
This is what I'd like to create with my own data, how can I add that gradient and colorbar to my plot
0 Comments
Accepted Answer
darova
on 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
More Answers (1)
See Also
Categories
Find more on Colormaps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!