Filter löschen
Filter löschen

How to have two sets of values on one colorbar

3 Ansichten (letzte 30 Tage)
Brandon Bush
Brandon Bush am 26 Jun. 2018
Bearbeitet: Brandon Bush am 26 Jun. 2018
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

Antworten (0)

Kategorien

Mehr zu Colormaps 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!

Translated by