sj755
sj755

Reputation: 4062

How to shift position of colorbar in 3d plot

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

Answers (1)

H.Muster
H.Muster

Reputation: 9317

You can use findobjto 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

Related Questions