View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Figure Rotator

5.0 | 5 ratings Rate this file 14 Downloads (last 30 days) File Size: 7.23 KB File ID: #39558 Version:
image thumbnail

Figure Rotator


Tucker McClure (view profile)


08 Jan 2013 (Updated )

Allows a user to easily navigate around a target point in a 3D figure using a mouse.

| Watch this File

File Information

The FigureRotator is a light and fast tool allowing a user to easily navigate around a target point in a 3D figure using a mouse. The camera will "orbit" a target point, move in and out, and zoom.
While these types of motion are available in MATLAB's built-in Camera Toolbar, the FigureRotator provides a combined interface allowing rotation, movement, and zooming to happen all at once by using the left mouse button for rotation, the scroll wheel for movement in and out, and the right mouse button for zooming, allowing a user to explore a 3D object more quickly. Further, the FigureRotator appears to work more quickly than the Camera Toolbar tools if the figure is also being animated.

f = FigureRotator(gca());

Try 'help FigureRotator' for more examples or see example_figure_rotator.m for an example involving smooth motion during animation.


This file inspired Figure Control Widget and Voxel Plotter.

Required Products MATLAB
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
03 Nov 2016 amatuercoder

Great tool! there a way to get this to zoom in on the current mouse position in the figure?

25 Apr 2016 amatuercoder

Would anybody know how to incorporate a camlight update within this? Something like


everytime you clicked the mouse.

Comment only
22 Feb 2016 Johannes Korsawe

Ingenious. Why isn't this original MATLAB functionality?

27 Nov 2014 John

John (view profile)

08 Jul 2013 Tucker McClure

Tucker McClure (view profile)

Hi Mohamed,

Thanks for the feedback! Oliver's tool (the URL is in his comment below) includes panning. Panning could also be added directly to the FigureRotator, but I chose not to do this for a good reason. The FigureRotator is an "orbit a point" type motion instead of a "stand in a point and look around" type of motion. As such, if one was to pan around a bit, the point that one is "orbiting" becomes unclear, and getting it where one wants it might be difficult.

When I've created tools like this in the past for specific projects, I usually added "hotkeys" or something to change the orbit point (CameraTarget) from one object (say, a location on the ground) to another object (say, a satellite).

If you'd definitely like to add panning to this and aren't concerned about "losing" the orbit point, then just message me, and I can provide some tips!

Thanks again.

Comment only
08 Jul 2013 Mohamed Aissiou

Hi Tucker,
Do you have an idea how panning (using the mouse) can be added?

I tried to work with 'Cameratarget','Cameraposition' and 'Cameraupvector'.... but no way.

10 Jan 2013 Oliver Woodford

I like that it uses the scroll wheel.
Here's yet another:

03 Oct 2014 1.1

Updated for new R2014b graphics system.

01 Sep 2016

Updated license

Contact us