UIAxes 3D scatter plot becomes simplified when rotating with the mouse (App Designer)
Show older comments
Hello,
I am displaying a 3D point cloud in App Designer using a tiledlayout with a UIAxes with MATLAB 2024b. The point cloud is plotted using scatter3.
When the figure is displayed normally, all points appear as in the image below (the volume of interest is circled in red):

However, when I use the mouse rotation tool on the axes, the rendering changes and the plot becomes visually simplified, as illustrated below:

It looks like MATLAB reduces the number of visible points or changes the rendering during the interaction.
Interestingly, the simplified rendering actually looks cleaner and closer to what I want, so I would like to obtain this second rendering as the default display, even when the axes are not being rotated.It is to be noted that I have not noticed this effect when displaying the cloud point in a separate figure.
I would like to know if there is a way to force MATLAB to use this simplified rendering permanently?
Thank you for your help.
Cheers,
Guillaume.
5 Comments
dpb
on 16 Mar 2026
I can't see the simplification of which you speak?
Guillaume
on 17 Mar 2026
Dunno that anybody here can do anything w/o the dataset to play with...
If doing the rotation programmatically doesn't produce the result desired, I suspect that contacting Mathworks support would be the only way(*) to determine if there is indeed some such reduction applied and to learn what might be being done internally.
However, I suspect if you had another sample dataset, the chances are whatever effects there are in this image may well not appear in another with just a somewhat different distribution of data point locations so I expect you're chasing a mirage.
If you enlarge that (or any other) area can you actually see clearly enough the individual points and discover that not every point really is not being displayed or is it, as I suspect, just an optical illusion? If there really are fewer points being plotted, then you should be able to discern which are missing and discover whether it is something like just a decimation by some factor or if points are being screened perhaps on basis of their Euclidean separation. You could then try to do a programmatic operation similar in nature and see how that works.
(*)I haven't searched to see if perhaps the internal callback of the rotation tool might be m-code or whether it is exposed at all -- programmatically it would seem that perhaps figuring out if there's a way to call that code directly or being able to see what it does would be the only way to reproduce identically what is happening.
Guillaume
on 18 Mar 2026
dpb
on 18 Mar 2026
Good luck...will be interested to hear what they have to say.
Answers (1)
Your hunch is correct. In some conditions, the data in the visualization is subsampled to support smoother interactions.
> I would like to know if there is a way to force MATLAB to use this simplified rendering permanently?
No. But you could subsampled the data yourself which should result in a similar appearance, if this is indeed what you're running into. To mimick this behavior, select a random sample of 50,000 points from the dataset.
randperm comes in handy.
n = 1e6; % number of points
% Create dense sphere
theta = 2*pi*rand(n,1);
phi = acos(2*rand(n,1)-1);
r = rand(n,1).^(1/3);
x = r .* sin(phi) .* cos(theta);
y = r .* sin(phi) .* sin(theta);
z = r .* cos(phi);
% subsample 50k points
idx = randperm(n, 50000);
% Show full dataset and 50k random sample
clf
tiledlayout(1,2)
nexttile
scatter3(x, y, z, 60, r, '.')
title("Full")
nexttile
scatter3(x(idx), y(idx), z(idx), 90, r(idx), '.')
title("Subsampled")
colormap jet

2 Comments
dpb
on 7 Apr 2026
@Adam Danz, I don't suppose TMW would care to share any insight on the logic behind the subsampling such that one (like @Guillaume) could come closer to approximating what is observed.
I'd be happy to share what I can.
When you create a plot that has a high density of markers in a system that does not have hardware-accelerated graphics, the plot may displays fewer markers. This change helps to maintain responsiveness during plot interactions. Subsampling is random. The first time this happens a warning appears stating, hardware-accelerated graphics is unavailable. Displaying fewer markers to preserve interactivity. -R2024a release note
Let's see if I can trigger it here on MATLAB Answers.
n = 1e6; % number of points
% Create dense sphere
theta = 2*pi*rand(n,1);
phi = acos(2*rand(n,1)-1);
r = rand(n,1).^(1/3);
x = r .* sin(phi) .* cos(theta);
y = r .* sin(phi) .* sin(theta);
z = r .* cos(phi);
% subsample 50k points
idx = randperm(n, 50000);
scatter3(x, y, z, 60, r, '.')
colormap jet
Categories
Find more on Graphics Performance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

