Borrar filtros
Borrar filtros

How to have two sets of values on one colorbar

3 visualizaciones (últimos 30 días)
Brandon Bush
Brandon Bush el 26 de Jun. de 2018
Editada: Brandon Bush el 26 de Jun. de 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

Respuestas (0)

Categorías

Más información sobre Colormaps en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by