MATLAB Answers

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

7 views (last 30 days)
Halle Berger
Halle Berger on 17 Sep 2019
Commented: Halle Berger on 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

  0 Comments

Sign in to comment.

Accepted Answer

darova
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)

Sign in to answer this question.

Products


Release

R2019a