필터 지우기
필터 지우기

How to have two sets of values on one colorbar

조회 수: 3 (최근 30일)
Brandon Bush
Brandon Bush 2018년 6월 26일
편집: Brandon Bush 2018년 6월 26일
I have plotted a scatter plot on top of a contour plot, however the color properties are not the same. ie) on the contour plot, the highest value is 10 and should be represented at the top of the colorbar, but on the scatter plot, the highest value is 100 and should be at the top also. Is there a way to place a separate range of values on the left side of the colorbar? (Picture below for reference)
This is the code i used to make the first value range
levels = 2.^(-3:7); %11 levels
cbh = colorbar ; %Create Colorbar
cbh.Ticks = linspace(0, 5.5, 11) ; %Create 11 ticks from zero to 1
cbh.TickLabels = num2cell(levels); %Replace the labels of the ticks with the
values in level

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by