How do I add "crosshairs" to my figure while I use the Camera Toolbar without them being affected by the toolbar?
10 views (last 30 days)
Show older comments
MathWorks Support Team
on 14 Nov 2022
Answered: MathWorks Support Team
on 24 Jan 2023
I want to manipulate a surface object using the Camera Toolbar. However, I have decided to include "crosshairs" above it (two intersecting lines), so I can maintain where the camera target point is. Unfortunately, when using the Toolbar, I can manipulate these lines (i.e., orbit, pan, zoom, etc.). Is there a way I can include these lines in my figure without them being movable?
Accepted Answer
MathWorks Support Team
on 14 Nov 2022
Including two "Axes" on a figure while using the Camera Toolbar will result in one camera corresponding to each "Axes", resulting in complex behavior. A better alternative is using the "annotation" function. For example, the below code will create a new figure with the desired "crosshairs":
f = figure;
an1 = annotation('line', 'Position', [0.5 0 0.01 1]);
an2 = annotation('line', 'Position', [0 0.5 1 0.01]);
0 Comments
More Answers (0)
See Also
Categories
Find more on Camera Views in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!