Is it possible to use different shading
types in the same figure?
For example this code:
figure; hold on
surf(1:10,1:10,repmat(1,10,10),rand(10))
shading flat; hold on
surf(1:10,1:10,repmat(3,10,10),rand(10))
shading flat; hold on
surf(1:10,1:10,repmat(5,10,10),rand(10))
shading interp
view(-15,32)
So that the last shading
determines the type interp
for all the objects in the figure.
Is there some work around?
By default,
'FaceColor'
isflat
and'EdgeColor'
isblack
when you usesurf
.shading flat
sets the'FaceColor'
as'flat'
and'EdgeColor'
asnone
.shading interp
sets the'FaceColor'
as'interp'
and'EdgeColor'
asnone
.So you can specify those properties like this:
which gives:
or get a handle to each surface plot and change that later as shown in the documentation.