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:
What is the relationship between "linkaxes" and "xlim mode" ?

Subject: What is the relationship between "linkaxes" and "xlim mode" ?

From: Camille Couzi

Date: 8 Nov, 2010 19:43:03

Message: 1 of 1

Hi matlabers!
I am working with two axes (axes1 and axes2) where I plot matrix with imagesc. The matrix I plot are the same size in both axes (let say size(m)=50 40 )
I have a third axe(axes3) which is always x linked with axes2.
furthermore, I sometimes link x and y on axes1 and axes2.

I have an option in my GUI to make a "zoom box", which consists in chose the limits of the x axis for axes1 and axes2.

Well, when axes1 and axes2 are NOT linked, the zoom box works perfectly (making it, and then utrning it off - by writting set(axes1,'xlim','auto') and same for axes2

BUT when I link them for x and y axis, and them I call the zoom box, it works ok when making it, but when I want to turn it off, the x axis takes bigger limits than the quantity of data, ie instead of showing a nice imagesc for my 50*40 matrix, I get more x values, white! (so I get an imagesc for a 50*50 for example...

There seem to be a fight between link axes and xlim... someone can help me?
thanks a lot in advance
Camille.

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