Reputation: 4062
I'm displaying a 3D scatterplot, but label on the z-axis is getting overlapped by the color bar. How can I shift the color bar a desired number of pixels to the right or left?
Upvotes: 2
Views: 2221
Reputation: 9317
You can use findobj
to get an handle to the colorbar, query its current position via get
and then modify according to your needs and change it using set
:
h = findobj('tag', 'Colorbar');
pos = get(h, 'position')
% modify pos according to your needs
set(h, 'position', pos)
Upvotes: 1