Put Annotation Behind Legend ?

8 ビュー (過去 30 日間)
David Hutto
David Hutto 2019 年 8 月 13 日
編集済み: Adam Danz 2019 年 8 月 13 日
When adding an annotation (line for example) it is always placed in front of the Legend. This occurs if creating the annotation before creating the Legend, or creating the annotation after creating the Legend. Is there a way to put the annotation behind the Legend so that the lines of the annotation do not overap the Legend ? Thanks very much.
  1 件のコメント
Adam Danz
Adam Danz 2019 年 8 月 13 日
編集済み: Adam Danz 2019 年 8 月 13 日
Interesting finding. Changing the uistack() doesn't help either.
Here's a reproducible demo.
figure
plot(1:10)
x = [0.2 0.5];
y = [0.9 0.5];
ah = annotation('textarrow',x,y)
lh = legend('location','northwest')%,'color', 'w')
[update]
Note that the annotation object cannot be placed under line objects either.
[update 2]
This is a known problem and described here. See that link for a work-around.
"All of these limitations originate from the underlying implementation of annotation objects in Matlab. This is based on a transparent hidden axes that spans the entire figure’s content area, on which the annotations are being drawn (also called the scribe layer)."

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by