pcshow permanently changes figure window?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (2)
Ishan
il 28 Nov 2022
Modificato: Ishan
il 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 Commento
Pravarthana P
il 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 Commenti
Vedere anche
Categorie
Scopri di più su Point Cloud Processing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!