Display figure from .m file to MATLAB GUI

조회 수: 3 (최근 30일)
Pankaja Tanjore
Pankaja Tanjore 2015년 7월 3일
답변: Walter Roberson 2015년 7월 3일
Hello,
I have a 3Dpoint cloud that is mapped in a figure.I am using the following code
figure, showPointCloud(pointCloudDisp, J1, 'VerticalAxis', 'Y',...
'VerticalAxisDir', 'Down' );
xlabel('X');
ylabel('Y');
zlabel('Z');
to get a figure with PointCloud plotted on three axes.
I am sending here the screen shot of the figure.
I need to take this figure and display it on the GUI axes. Is there a function which can directly take the fig from .m file and display on axes.
Please let me know about this.
Looking forward to hear from you at the earliest.
Thanks Pankaja

채택된 답변

Walter Roberson
Walter Roberson 2015년 7월 3일
thisax = handles.UseAppropriateAxesNameHere;
showPointCloud(pointCloudDisp, J1, 'VerticalAxis', 'Y',...
'VerticalAxisDir', 'Down', 'Parent', thisax );
xlabel(thisax, 'X');
ylabel(thisax, 'Y');
zlabel(thisax, 'Z');
That is, write the point cloud directly into the axes where you want it to go.

추가 답변 (1개)

Joep
Joep 2015년 7월 3일
You need to find the axes of your figure in your Gui. sometime gca will work but in the most of case you need to use your handles. The axes will only update if you have a update/create function for your figure. You should recall that function. Example are given by Doug Hull.

카테고리

Help CenterFile Exchange에서 Point Cloud Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by