pcshow permanently changes figure window?
4 次查看(过去 30 天)
显示 更早的评论
This is a minor issue but I'm not sure it's intended behaviour. When using pcshow to display a pointcloud, the figure window switches to a pointcloud viewer appearance (black background) and this change is persistent through clearing the figure (i.e., with clf).
Simple example:
load('object3d.mat')
figure(1);
pcshow(ptCloud);
clf; %This should leave us with a blank figure.
A = [0 0 0;0 1 0;0 0 1];
plot3(A(:,1),A(:,2),A(:,3),'.'); %plot something
This behaviour seems inconsistent with most other use cases in which clf completely resets the figure to default.
0 个评论
回答(2 个)
Ishan
2022-11-28
编辑:Ishan
2022-11-28
load('object3d.mat')
figure(1);
pcshow(ptCloud);
clf; %This should leave us with a blank figure.
A = [0 0 0;0 1 0;0 0 1];
plot3(A(:,1),A(:,2),A(:,3),'.'); %plot something
So, in your case also the axes get cleared after clf is called (resulting in a black screen) and values get reset to default. When you plot on the same figure it gets plotted over the same initial set of axes you used earlier, hence the behavior seems to be consistent.
For more information, please refer to: -
Also, the recommended function to use for removing app data is actually ‘rmappdata’. ‘clf’ us mainly used to clear the figure window. The syntax for ‘rmappdata’ is as follows:
rmappdata(h,name) % removes the application-defined data, name, from its association with the UI component, h.
Pravarthana P
2022-11-28
Hi John Enright,
The functionality of ‘clf’ command is to clear the contents of the figure window.
‘rmappdata’ will remove the application data, identified by name, from its association with the UI component obj.
The following documentation links may be used for further information:
Hope this information helps you!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Point Cloud Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!