caxis equivalent for slice plot
2 次查看(过去 30 天)
显示 更早的评论
I have a plot that uses the slice command.
Is there a way to rescale the colormap of the resulting slice as would usully be done throiugh caxis([lower upper])?
0 个评论
采纳的回答
Ameer Hamza
2020-12-30
编辑:Ameer Hamza
2020-12-30
caxis() also works for slice(). See the difference between two figures
[X,Y,Z] = meshgrid(-2:.2:2);
V = X.*exp(-X.^2-Y.^2-Z.^2);
xslice = [-1.2,0.8,2];
yslice = [];
zslice = 0;
figure()
slice(X,Y,Z,V,xslice,yslice,zslice)
figure()
slice(X,Y,Z,V,xslice,yslice,zslice)
caxis([-2 2])
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!