Fill under lines in plot3
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I need to fill under the Z-data in a plot3. I have below function.
function mmplot3(x,y,z,c,w,b,d)
%MMPLOT3 3-D color-based plot.
% MMPLOT3(X,Y,Z,C,W,B) or MMPLOT3(X,Y,Z,C,W,B,D), where X, Y, Z and C are
% 4 vectors of the same length, plots a line in 3-space through the points
% whose coordinates are the elements of X, Y and Z with colors
defined by
% vector C. W is the width of the line, B is the line brightness while
% solid line plot is used, otherwise it's the marker style and D is the
% indices increment.
x = x(:); y = y(:); z = z(:); c = c(:);
switch b
case {'.','o','x','+','*','s','d','v','^','<','>','p','h'}
iNaN=find(isnan(x));
if isempty(iNaN), iNaN = length(x); end
i = [1:d:iNaN(1),iNaN(1)];
x = x(i); y = y(i); z = z(i); c = c(i);
scatter3(x,y,z,w,c,b)
otherwise
plot3(x,y,z,'linestyle','none') % make a blank plot
surface([x, x], [y, y], [z, z], ...
[c, c], 'EdgeColor','flat', 'FaceColor','none', 'linewidth',w, 'EdgeAlpha',b)
end
Please see attached. The 3d plot I have (on the right hand side attached) is quite is unclear, not like the figure on left hand side.
I need to fill under the Z data with white color.
Also associate each Z-data with each time (X-data) in the plot.
4 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Graphics Performance dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!