Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9187491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:46:54+00:00 2026-06-17T19:46:54+00:00

Consider the following example code: load sumsin; s = sumsin+10; % example data series

  • 0

Consider the following example code:

load sumsin; 
s = sumsin+10; % example data series
time = linspace(0,5*24,1000);

figure(1);
subplot(311);
plot(time,s,'k');

subplot(312);
plot(time,s,'k');
hold on;
[s_denoised,~, ~] = wden(s,'minimaxi','s','sln',1,'db4');
plot(time,s_denoised,'r');

subplot(313);
plot(time,s,'k');
hold on;
plot(time,s_denoised,'r');
xlim([20 40]);

Resulting in
enter image description here

I would like to alter this plot by inserting lines between subplot 2 and 3 to show that subplot 3 is a portion of subplot2. For example:

enter image description here

How can this be achieved in matlab?

Edit:

I was thinking of something along the lines of generating a invisible axes over the entire figure, obtain the position of each subplot, the location of 20 and 40 will be a certain percentage of the subplot width so I could use the annotation command from here to start a line and then apply the same method to the third subplot to connect the lines with the desired location. I have trying this, but no solution so far.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:46:56+00:00Added an answer on June 17, 2026 at 7:46 pm

    Just for the sake of the answer, you could use annotation objects to get the effect that you’re looking for, as correctly suggested in a comment. Note that their coordinates have to be normalized to the [0, 1] range with respect to the figure window, so it might be quite tedious to adjust them.

    This does get the job done, but it’s horrible. Don’t do it this way.

    Example

    Since I don’t have your original data, I’ll draw something of my own (but similar to yours):

    t = linspace(0, 120, 1000);
    s_denoised = sin(t / 2);
    s = s_denoised + 0.2 * randn(size(s_denoised));
    subplot(3, 1, 1), plot(t, s, 'k')    
    subplot(3, 1, 2), plot(t, s, 'k', t, s_denoised, 'r')    
    subplot(3, 1, 3), plot(t, s, 'k', t, s_denoised, 'r'), xlim([20 40])
    

    Now let’s add “annotation” lines like you want:

    annotation('doublearrow', [.26 .39], [.38 .38]); %// Top double-arrow line
    annotation('doublearrow', [.13 .9], [.34 .34]);  %// Bottom double-arrow line
    annotation('line', [.325 .325], [.38 .37]);      %// Top little connector
    annotation('line', [.515 .515], [.35 .34]);      %// Bottom little connector
    annotation('line', [.325 .515], [.37 .35]);      %// Line
    

    Result:

    result image

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please consider the following example code (from the lm doc): ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt
Consider following SWT code example: http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet151.java?view=co How can I separate the inline defined class?
Consider the following example code. The example is given just to highlight the different
Consider the following example code: http://code.google.com/apis/maps/documentation/javascript/examples/streetview-simple.html I can do scrollwheel: false on a mapOptions
Consider the following example code: class Foo { }; class Bar : public Foo
Consider the following code example: <!DOCTYPE html> <html> <head> <title>HTML5-Template</title> <meta http-equiv=content-type content=text/html; charset=utf-8>
Consider the following simple example of code: public class TestStaticImport { static enum Branches
Consider the following code example (python 2.7): class Parent: def __init__(self, child): self.child =
Consider the following C++ code example: int array_1[] = {5,6,7}; int array_2[] = {6,7,8,9};
Consider the following example F# code: type mytype() = member this.v = new OtherClass()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.