change colormap labels in mayavi/mlab

1.2k views Asked by At

I'm doing a quiver3d plot with vector length scaled by log(length)+5 in order to visualize a large range of lengths between 0 and 1. Is there however a way to change the colormap back to the original values while showing a logarithmic scale? I would like to do this purely in python, because if have problems running the mayavi GUI.

trying to change this to logarithmic

2

There are 2 answers

0
aestrivex On

I don't know of a nice way to do it, but I can think of a hacky one that might well be the easiest thing to do: create an invisible dummy object with the right colormap, and display the colorbar from that object.

0
max On

I am not sure whether this helps in your case but you could use quiver3d's scale_factor argument to limit the maximum quiver length. But that is of course linear scaling, not logarithmic.