MATLAB Answers

Arrow between two subplots

38 ビュー (過去 30 日間)
Robinson Medina Sanchez
Robinson Medina Sanchez 2018 年 5 月 25 日
回答済み: Hasan Alrajhi 2019 年 8 月 4 日
I have a very simple question. I have a scope (in simulink) with three different subplots inside. I want to add some arrows to it, so I used the "print to figure" option. Once I have the figure, I added the arrow using the insert-> arrow, but I cannot extend it over more than one subplot. I tried to used the annotation command in the workspace but it doesn't draw anything:
Any idea what am I doing wrong? Thanks in advance for your suggestions.

回答 (2 件)

per isakson
per isakson 2018 年 5 月 26 日
編集済み: per isakson 2018 年 5 月 26 日
See Line Properties. Set the value of the property
Clipping — Clipping of object to axes limits
to off. Doc says:
Clipping of the object to the axes limits, specified as one of
these values:
'on' Do not display parts of the object that are outside the
axes limits.
'off' Display the entire object, even if parts of it appear
outside the axes limits. ...
  2 件のコメント
per isakson
per isakson 2018 年 5 月 30 日
"I have a very simple question." It appears to be simple, but I fail. Caveat: I'm not up to date with the new graphic stuff.
Simple experiment on R2017b:
arh=annotation('arrow', [0.1,0.9 ],[0.1,0.9] )
arh.LineWidth = 5;
arh.Color = [1,0,0];
>> arrowParent = arh.Parent ;
>> arrowParent.Type
ans =
>> arrowParent.Parent
ans =
Figure (1) with properties:
I had little success with your figure:
  • missing tileGrid throw an error when I tried to open the figure. I added an empty function, which helped to open the figure.
function tileGrid( varargin )


Hasan Alrajhi
Hasan Alrajhi 2019 年 8 月 4 日
annotation('arrow',[0.463690476190475 0.5703125],...
[0.518164960688327 0.922118380062305],'Color',[1 0 0],'LineWidth',5)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by