How can I make the surface plot (surf) look less shifty between plotted distributions?
Show older comments
Hello,
I'm trying to make a surface plot that shows average growth factor distributions per 4hrs over multiple days. The growth factors come from "dia" and the "fits" are the distribution part/number fraction seen in that bin. I am able to make the surf plot, but I'm trying to not have it do that weird slide up or down that is sometimes seen in between some of the scans. I'd rather it just show the previous distribution throughout the whole time frame until the next distribution is, then it switch to that. I'm pretty bad at verbally explaining it, and so I attached a photo of the plot with arrows pointing to what I don't want to see and to what I do want to see. Hopefully there is a way to fix this issue or at least a different type of plot that maybe would give the results I'm looking for.

The code for it is below and I attached the table used to make this plot:
load 'Data_tbl used in question.mat'
% Set Individual Variables
dia = data_tbl.Dia;
fit = data_tbl.Fit;
time = data_tbl.Time;
figure('Position',[10 10 1400 400])
surf((dia./100),time,fit,'EdgeColor','none') % divided by 100 to get growth factor instead of diameter
hold on
colormap("turbo")
view([90,-90]);
xlim([0.75 2.5])
xlabel("GFs"); zlabel("Diameter (nm)");
c = colorbar('Location','eastoutside');
ylabel(c,"CPCA Conc:CPCB Conc.");
ylim([time(1,1) time(end,1)])
title(setRH(:,rh) + "% RH at 100 nm for " + string(time(1,1),"MMM d, uuuu hh:mm aa") + "-" + string(time(end,1),"MMM d, uuuu hh:mm aa"));
Let me know if something seems like its missing or if more clarification is needed.
Thank you!
Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots 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!

