Clear Filters
Clear Filters

Double click on axes resets parameters wrongly

5 views (last 30 days)
Dear experts,
I have a GUI that processes and visualizes pointcloud data (created with GUIDE). When I import a pointcloud correctly, all further plots are correct as well. But when i accidentally import a wrong pointcloud (e.g currupted data or an image etc), the inital axes parameters are set in an unwanted manner (e.g. wrong limits or aspectratio etc.)
  1. When I then import the correct pointcloud, it will be displayed with the initial (wrong) axes settings.
  2. When I manually frame the pointcloud in a correct manner (either with zoom and pan toolbar, or with set(gca,'Xlim'...) commands), everything looks fine.
  3. But when I double click on the plot, it rests the axes parameters to the inital (wrong values).
the attached images show step 1-3.
The following table shows the axes parameters for step 1-3:
My actual question is: How can I influence the values, that a double click rests to?
When I initially imported the correct pointcloud, the double click will always reset to a satisfying view. When I imported something wrong a first, a double click will reset to a wrong view later.
additional information:
the actual plotting looks something like this:
axes(handles.axes1); cla;
hold on;
scatter3(Punkte(pos,1),Punkte(pos,2),Punkte(pos,3),Settings2(2),[Punkte(pos,4)+0.9, zeros(size(Punkte(pos,4))),zeros(size(Punkte(pos,4)))],'filled');
grid on;
rotate3d on;
hold off
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.7.0.1190202 (R2019b)
MATLAB License Number: ##########
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 19044)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.7 (R2019b)
GUI Layout Toolbox Version 2.3.4 (R2018b)
MATLAB Compiler Version 7.1

Answers (1)

Dinesh
Dinesh on 23 Oct 2023
Hi Marten,
I understand that when you import the correct point cloud, it will be displayed with the initial (wrong) axis settings if you previously imported wrong or corrupted data. After manually setting the plot axes to correct one, you do not want a double-click to take you back to the wrong axes.
To solve this problem, you can use the following command:
zoom reset
The above command resets the default view of the plot. This means that when you double-click, the plot will go back to the point where you performed the zoom reset.
For more details regarding the zoom object, please refer to the following MATLAB documentation:
Hope this helps.
Best Regards,
Dinesh Reddy Gatla.

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!