Exponent Property of Colorbar
76 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Software Developer
el 3 de Abr. de 2018
Editada: Yair Altman
el 12 de Abr. de 2018
In standard axes I am able to change the Exponent property to force scientific notation. In this specific case I have an axes that contains an image overlayed with a colormap, I use a colorbar as a legend to the colormap. I am not able to access the Exponent property of the colorbar through either the parent axes handle nor the colorbar handle.
I found a workaround on Stackoverflow that I can rewrite, but I just wanted to check if I'm missing something obvious. SO Link: Stackoverflow Link
Thank you for any insight.
0 comentarios
Respuesta aceptada
Walter Roberson
el 4 de Abr. de 2018
cb = colorbar();
cb.Ruler.Exponent = 2;
3 comentarios
Walter Roberson
el 4 de Abr. de 2018
See https://www.mathworks.com/matlabcentral/answers/1325-what-is-missing-from-matlab#comment_472496 for my tool for looking at properties of objects.
There are a lot of undocumented properties of graphics objects. Some of them are fairly mystifying, others clear but of no obvious use, and some are useful.
Note: some of the properties the mentioned tool finds can be examined and changed directly, but sometimes you need to use struct() to get at a higher level private handle that you can then set the properties of.
Yair Altman
el 12 de Abr. de 2018
Editada: Yair Altman
el 12 de Abr. de 2018
See https://undocumentedmatlab.com/blog/customizing-axes-rulers - this has been posted way-back in 2014 and some of the fine details have changed since then, but the basic concept remained unchanged.
See the list of related posts at the bottom of that article for many other undocumented ways by which you can customize your plots.
Más respuestas (0)
Ver también
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!