I'm trying to plot a view of my stl mesh file in poseplot. However, the actual object seems to be dwarfed by the set of axes that the poseplot function has added to the mesh file. Is there a way to resize the axes (or remove them altogether) so that the object is properly visible?

 채택된 답변

Ryan Salvo
Ryan Salvo 2022년 5월 25일

0 개 추천

Hi Floris-Jan Nieuwenhuis,
If the ScaleFactor Name-Value argument does not resolve the scaling issue, I recommend trying the plotTransforms command instead, as it provides more explicit controls for the length of the axes.
Thanks,
Ryan

댓글 수: 3

Floris-Jan Nieuwenhuis
Floris-Jan Nieuwenhuis 2022년 5월 25일
편집: Floris-Jan Nieuwenhuis 2022년 5월 25일
ScaleFactor also scales the mesh, and I want to change the size of the axes relative to the mesh. I think my question was improperly written. When I mean axes I mean the (in this plot) red and blue axes that the poseplot function attaches to the object. The object itself becomes difficult to see because the plot zooms out so much to include the disproportional local XYZ axes. plotTransforms is very helpful, the only issue is that there is no way to scale the mesh with plotTransforms, which means that the mesh is dwarfed by the quiver3 object that I have in the same plot (which constantly changes). Ideally I'd like to plot just the mesh without local axes, so that you can see the quiver3 object in relation to the mesh.
To remove the frame axes in the plot, you can search for them in the axes handle returned by plotTransforms and then delete them.
figure
ax = plotTransforms([0 0 0], quaternion(1,0,0,0), "MeshFilePath", "groundvehicle.stl");
% Remove frame axes objects.
frameAxes = findobj(ax, "Type", "Line");
delete(frameAxes);
Please note that you will have to perform a more robust check on the output of findobj if your figure contains other Line objects that should not be deleted.
I've tried a few configurations with the plotTransforms command, but utlimately not being able to scale the model has a huge disadvantage in my application. I'll stick to the poseplot command.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Axes Appearance에 대해 자세히 알아보기

제품

릴리스

R2021b

태그

Community Treasure Hunt

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

Start Hunting!

Translated by