How do I get a cursor location in a pcshow figure?

11 ビュー (過去 30 日間)
Sean Walsh
Sean Walsh 2017 年 5 月 26 日
編集済み: Sean Walsh 2017 年 6 月 2 日
Here is what I'm trying to do:
set(gcf, 'WindowButtonDownFcn', {@getclicklocation, PC});
However, I end up with the error "Warning: Setting the "WindowButtonDownFcn" property is not permitted while this mode is active."
Does the pcshow function not allow for interaction?


J Philps
J Philps 2017 年 5 月 31 日
The reason for this warning is that, by default, the pcshow plot turns the 'Rotate3D' setting on (so that you can view the point cloud easily). You can turn this setting off, and you will no longer receive that warning. Your new code could look like this:
rotate3d off;
set(gcf, 'WindowButtonDownFcn', {@getclicklocation, PC});
  3 件のコメント
Sean Walsh
Sean Walsh 2017 年 6 月 2 日
ah that was my mistake when writing it out I was testing without the space before the (


その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by