필터 지우기
필터 지우기

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

조회 수: 5 (최근 30일)
This is what I'd like to create with my own data, how can I add that gradient and colorbar to my plot

채택된 답변

darova
darova 2019년 9월 23일
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

추가 답변 (1개)

Jalaj Gambhir
Jalaj Gambhir 2019년 9월 20일
Hi, colormap's can be used to do so. Look at an example here.

카테고리

Help CenterFile Exchange에서 Colormaps에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by