How to get rid of 3D coordinate system symbol/object from pdegplot output.

조회 수: 25 (최근 30일)
I need to import and plot a few .stl models in a single figure. I am able to do so using pdegplot and hold on commands
model = createpde;
importGeometry(model,'./FullModelBase2.stl'); % binary model files available in attached zipped folder
pdegplot(model,'FaceLabels','off')
hold on;
model2 = createpde;
importGeometry(model2,'./FullModelBase1.stl');% binary model file
pdegplot(model2,'FaceLabels','off'); hold off;
but with each plot the basis of 3D coordinate system is also displayed as shown in figure. Laborius and difficult way is to delete them by manual selection and delete key. I am not able to find any property name associated with it, which can be used in script to automate this task. Is there any alternate way to do so? I have attached the zip file containing .stl files that can be used to try.

채택된 답변

Mehmed Saad
Mehmed Saad 2020년 5월 7일
편집: Mehmed Saad 2020년 5월 7일
b=findobj(gca,'Type','Quiver');
Now b has the property of both Quiver. set there visibilty to off or whatever you want (use set for that purpose)
It still has the text x y z
c=findobj(gca,'Type','text');set(c,'String','');
But it will also remove any other text type you have in figure. so
findobj(gca,'String','x','-or','String','y','-or','String','z')
will give you object with string equal to x or y or z
  댓글 수: 5
Mehmed Saad
Mehmed Saad 2021년 3월 2일
i dont know why it is not working on 2020a and 2020b (it is not considering Text as object). Just set the visibility of Text object manually
a = gca;
disp(a.Children)
and change the visibility of text object manually to 'off'
Jibiao Chen
Jibiao Chen 2021년 8월 12일
I think this issue may be caused by the MATLAB version. It works well in 2019a.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Cameron
Cameron 2023년 11월 22일
In Matlab 2022b, you can remove the quiver and axis labels with this method:
% Find the quiver object
originQuiver = findobj(gca,'Type','Quiver');
% Turn off the visilility of the quiver
set(originQuiver,'Visible','off');
% Turn off the visilibty of the text on the middle layer (x,y,z labels)
set(findall(gca,'Layer','Middle'),'Visible','Off')

카테고리

Help CenterFile Exchange에서 Geometry and Mesh에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by