Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
subplots: freeze all axes when zooming?

Subject: subplots: freeze all axes when zooming?

From: Matthias

Date: 8 Sep, 2010 11:12:04

Message: 1 of 4

Hi,
I have created a figure with 3 subplots that I wish to zoom in on. However, by default matlab will only let me zoom into a single subplot at a time, which makes reconciling the x-axes across all subplots a bit tricky. Is there a more efficient way I could try?

Subject: subplots: freeze all axes when zooming?

From: Steven_Lord

Date: 8 Sep, 2010 13:23:34

Message: 2 of 4



"Matthias " <matthew.goddard@bcf.uni-freiburg.de> wrote in message
news:i67r24$6ju$1@fred.mathworks.com...
> Hi,
> I have created a figure with 3 subplots that I wish to zoom in on.
> However, by default matlab will only let me zoom into a single subplot at
> a time, which makes reconciling the x-axes across all subplots a bit
> tricky. Is there a more efficient way I could try?

Use LINKAXES and/or the zoom mode's ActionPostCallback property.

http://www.mathworks.com/help/techdoc/ref/zoom.html

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: subplots: freeze all axes when zooming?

From: Thomas Vanaret

Date: 8 Sep, 2010 13:26:07

Message: 3 of 4

"Matthias " <matthew.goddard@bcf.uni-freiburg.de> wrote in message <i67r24$6ju$1@fred.mathworks.com>...
> Hi,
> I have created a figure with 3 subplots that I wish to zoom in on. However, by default matlab will only let me zoom into a single subplot at a time, which makes reconciling the x-axes across all subplots a bit tricky. Is there a more efficient way I could try?

See help on Matlab function "linkaxes", which alow to synchronize x- and/or y-axis of several subplots.

First input of the function is the vector of axes handle you want to link.
Axe handle is the optionnal output of "subplot" function.

Enjoy

Subject: subplots: freeze all axes when zooming?

From: Matthias

Date: 9 Sep, 2010 11:51:04

Message: 4 of 4

Thanks guys, linkaxes was exactly what I wanted!

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us