Thread Subject: linking two graphs

Subject: linking two graphs

From: bram derks

Date: 17 Aug, 2009 07:50:17

Message: 1 of 3

Dear,

I would like to do the following:

Suppose I have two graphs of two different functions of two variables.
The functions are related in the sense that the domain of one is a (linear) transformation of the other.

I would like to plot both in a different window, 'walk' through the domain in one graph (with the datacursor) and see a datacursor appear at the function values of the second function in its (transformed) domain.
Is this possible?

Maybe start with a simplification where both domains are the same?

Any help would be much appreciated.
Bram

Subject: linking two graphs

From: Paul Mennen

Date: 17 Aug, 2009 16:28:03

Message: 2 of 3

"bram derks" wrote
> I would like to plot both in a different window, 'walk' through the domain
> in one graph (with the datacursor) and see a datacursor appear at the
> function values of the second function in its (transformed) domain.

I believe the plot alternative "plt" found in the file exchange (search for "plt") will help since it data cursors are more sophisticated. Look at the example "demo\tasplt.m" since it does something similar to what you want. Two plots are created. Moving the cursor in plot 1 will also move the corresponding cursor in plot 2 (and visa versa) to keep them synchronized. The last 3 lines of the routine accomplish this feat. It's even simpler if you don't need the "visa versa" part. In that example the domains of the two graphs are the same, however since it synchronizes with respect to the index, the code will work as well with different domains as in your situation.

~Paul

Subject: linking two graphs

From: bram derks

Date: 24 Aug, 2009 09:15:20

Message: 3 of 3

Dear Paul,

Thans for your reply.
I checked plt function and I must see it looks great!
It is intended for 2D applications. Is any extension to 3D foreseen?

Bram

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
graphs bram derks 17 Aug, 2009 03:54:01
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com