How to remove points from a plot during pause

2 ビュー (過去 30 日間)
Raghunandan Pratoori
Raghunandan Pratoori 2019 年 12 月 30 日
回答済み: dpb 2019 年 12 月 30 日
I want to remove point from a plot and update the variable(doing that using brush tool and linking the data) and use the updated variable to go through additional processing. I tried that usign pause, and waitforbuttonpress, but when matlab is paused, I am not able to remove the data points. Say something like this,
Data=[1:1:100; 2:2:200];
scatter(Data(:,1),Data(:,2));
%delete few points using brush and update Data
length(Data)

回答 (1 件)

dpb
dpb 2019 年 12 月 30 日
Indeed, pause halts virtually everything...I'm not a GUI guy but two possibilities I can think of; there may be better for those who do know the innards:
  1. ginput lets you select points and return coordinates. Using those let you find the points and do something with them, or
  2. figure window callbacks still function during pause. A callback function tied to the window should let you do what you want.

カテゴリ

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

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by