MATLAB: How to hide the “Az: El:” readout while rotating an axes object

azimuthcameraguiMATLABprogrammaticr2018b

I'm designing a programmatic GUI with a popup window to illustrate how azimuth and elevation are defined. This illustration is in the form of axes that can be rotated by the user with some text underneath describing various terms.
Azimuth (in my use case) is defined as the angle measured clockwise from the positive y axis, but MATLAB's camera defines azimuth as the angle measured counterclockwise from the negative y axis. As a result, there is no way for me to change the plot (e.g. plotting the "positive y axis" on the negative y axis and hiding labels) such that both azimuth and elevation are measured the same for the camera and my use case.
The problem is, when the user rotates the axes object, a readout of camera azimuth and elevation is displayed in the lower left corner of the figure. I'd like to keep users from being confused by an az/el readout that doesn't match what is displayed in the plot. I've tried putting a uipanel over that part of the figure, but the az/el readout just appears over it as soon as I rotate the plot.
Can I hide this readout by turning off a property or covering it up with something else?

Best Answer

I've solved this, so I'll describe the solution in case anyone else wants to do this.
In my GUI, I had to enable rotation manually by using rotate3d. On a mouse drag, this function writes the camera azimuth and elevation to the current uimode's ModeStateData.textBoxText property, which is then displayed at the bottom left of the current figure. ModeStateData is a struct with a field textState set equal to 1. Setting this field equal to 0 turns off the az/el readout.
To do this in a gui, you'll have to get access to the uimode object handled by rotate3d. From a blog post on undocumentedmatlab.com, I found that this was possible using the uigetmodemanager function. The fix is a simple two lines:
hManager = uigetmodemanager(yourFigure);
hManager.CurrentMode.ModeStateData.textState = 0;