How can I put a line into an existing subplot
15 ビュー (過去 30 日間)
古いコメントを表示
Hello World,
I want to add a line into an existing subplot. I have identified the axes which form the subplot and set them to hold:
>> allAxes = get(gcf,'Children'); >> axis(allAxes(6)); >> hold on
(I can even toggle the visibility just to make sure these are the right axes)
If I call the code to produce the line:
>> line([a a], [b b]);
this line is allways created in a different subplot than the one I have choosen. I thought calling axis(allAxes(6)) makes the current subplot the active one?
Whats wrong? Any ideas? Sebastian
0 件のコメント
採用された回答
その他の回答 (1 件)
Honglei Chen
2012 年 3 月 15 日
Do you have to use line? You can try
plot(allAxes(6),[a a],[b b]);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Subplots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!