Borrar filtros
Borrar filtros

Logarithmic color scale in 2d histogram

19 visualizaciones (últimos 30 días)
sam ira
sam ira el 8 de Oct. de 2018
Comentada: ANKUR KUMAR el 8 de Oct. de 2018
I am looking for a way to change the colorbar of a 2d histogram plotted with DisplayStyle = 'tile' to a logarithmic scale so that one can better distinguish the frequencies. Unfortunally histogram2 has no property 'ColorScale'. Thanks in advance!

Respuestas (1)

ANKUR KUMAR
ANKUR KUMAR el 8 de Oct. de 2018
Use ruler.scale to set log axis in colorbar.
contourf(randi(1000,25,25))
cx= colorbar();
cx.Ruler.Scale = 'log';
cx.Ruler.MinorTick = 'on';
  2 comentarios
sam ira
sam ira el 8 de Oct. de 2018
Editada: sam ira el 8 de Oct. de 2018
I already tried this but got a
Warning: Error updating ColorBar
DataSpace or ColorSpace transform method failed
ANKUR KUMAR
ANKUR KUMAR el 8 de Oct. de 2018
Please attach you code along with the .mat file containing required variables.

Iniciar sesión para comentar.

Categorías

Más información sobre Histograms 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