pcshow permanently changes figure window?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (2)
Ishan
am 28 Nov. 2022
Bearbeitet: Ishan
am 28 Nov. 2022
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.
1 Kommentar
Pravarthana P
am 28 Nov. 2022
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 Kommentare
Siehe auch
Kategorien
Mehr zu Point Cloud Processing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!