Controlling title position in 3D plots

4 views (last 30 days)
Mike Wilson
Mike Wilson on 9 Jan 2015
Commented: Mike Wilson on 9 Jan 2015
I'm making animated 3D sequences of satellite data using the axesm('mapprojection', 'globe') option. The problem I have is that when viewing the result interactively, or when spinning the globe via animation, the title moves around on the screen.
I'm already using the approach suggested by other contributors of setting the title's units to inches. That does lock the title in vertically when using Rotate3D tool to interact with the globe, but title still moves horizontally. And when I zoom in, the title changes positions dramatically.
I also really want to move the title to the side of the plot instead of along the top as output will be 16x9 and I need the globe to fill as much of the vertical screen space as possible.
Interestingly, the colorbar does not have any of these issues. It stays right where it is initially placed through all Rotate3D and ZoomIn/Out actions.
Is there any way to create a title that behaves (stays locked in place) like the colorbar?

Accepted Answer

matt dash
matt dash on 9 Jan 2015
Edited: matt dash on 9 Jan 2015
You have a couple options. They are mostly based on the fact that the title's position is specified with respect to the axes position, which is why rotating the axes moves the title. You could either:
1) make a new invisible axes on top of the one you rotate, and use its title
2) instead of using the title command, make a text uicontrol and use it to display your title. Uicontrols are positioned in the figure, not the axes, so it won't be affected by rotating the axes.
  1 Comment
Mike Wilson
Mike Wilson on 9 Jan 2015
Great suggestions Matt. Thanks very much!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!