Borrar filtros
Borrar filtros

Set limit for colorbar in log 3D plot

4 visualizaciones (últimos 30 días)
Alberto Mora
Alberto Mora el 30 de Mayo de 2017
Comentada: Alberto Mora el 31 de Mayo de 2017
Dear all, I am plotting a 3D graph using a Z logaritmic axis. The surface have got a vertical asynthos (Z axis). For this reason I use Zlim([minDesidValue maxDesidValue]) to limit the Z axis. Consequently I set caxis([minDesidValue maxDesidValue]). However, considering the Z axis is logaritmic, the colorbar "draw" my surface in linear method, and so with unsatisfying results (I suppose that is caused by the linear relation between coloration and colorbar limits). In atteached you can see the figure. Best regars. Alberto Mora
  2 comentarios
KSSV
KSSV el 30 de Mayo de 2017
Use shading interp after plot....
Alberto Mora
Alberto Mora el 30 de Mayo de 2017
Editada: Alberto Mora el 31 de Mayo de 2017
Dear KSSV, I think that the result is remove just the grid on the surface. But it do not solve the problem. In practice I want that the graph is colored from blue to red color, while now is all blue.

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 31 de Mayo de 2017
If you are using R2014b or newer, then
cb = colorbar();
cb.Ruler.Scale = 'log';

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by