How to change surface plot size in figure window?

4 views (last 30 days)
Hey all, so I'm plotting a surface plot with a colorbar next to it, but the ticks and the label of the colorbar always get cut of (they don't fit in the figure window). How could I change that? I wish I could set the plot including the colorbar central in the window, now just the surface plot is central and the colorbar squeezed in next to it. If I change the position of the colorbar it gets to close or overlaps the plot and looks ugly. I tried stuff like InnerPosition and PaperPositionMode but it says that's not a "property on the Surface class"? Thanks in advance!

Answers (1)

Image Analyst
Image Analyst on 11 Nov 2016
Try other properties like Position and OuterPosition:
axesHandle.Units = 'normalized';
axesHandles.Position = [.2, .3, .4, .5]; % or whatever....
Try with the colorbar handle also
colorBarHandle = colorbar;
colorBarHandle.OuterPosition = ........
  1 Comment
Marilena Geng
Marilena Geng on 22 Nov 2016
thanks! I've been playin around with those, I'm still not all satisfied with what I get but I'll just keep trying

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!