replace one of many subplots

4 ビュー (過去 30 日間)
Max Müller
Max Müller 2014 年 8 月 12 日
コメント済み: Max Müller 2014 年 8 月 12 日
Hey Guys,
Imagine the following situation: You have got an amount of subplots in one figure. With ur your GUI u took the data from one Plot and changed some values of the it. Now u want to replot only the single subplot and keep the others. Any ideas...
PS: I want to keep the labels and titles....just change the plot line

採用された回答

Adam
Adam 2014 年 8 月 12 日
編集済み: Adam 2014 年 8 月 12 日
subplot(m,n,p)
should set the next plotting axes to the one in position p of your (m,n) grid in the same way as it would have done when you first plotted it.
To keep everything except the data the same you can simply use
set( hPlot, 'XData', newXData )
set( hPlot, 'YData', newYData )
if you get hold of (or already stored) the handle of your current plot on those axes. I think one of your previous questions received an answer that shows you how to get the handle for your line that would go where hPlot is above.
If you simply replot the data I think you will need to replace the title and labels also
  1 件のコメント
Max Müller
Max Müller 2014 年 8 月 12 日
well that works

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by