Name

Leaf properties — Emulated Matlab Leaf properties

Description

By Leaf we denote all graphic objects created by plotlib high level commands. They are actually of three possible types : Polyline, Segs, Fac3d or Compound. For the moment, there is only one set of properties, although some are only specific to given objetcs. These emulated properties can be accessed and changed by using set and get.

Faces
XData
YData
ZData
CData
CDataMapping
UData
VData
WData
VertexNormals
FaceNormals
Color
FaceColor
EdgeColor
LineWidth
LineStyle
Marker
MarkerSize
MarkerEdgeColor
MarkerFaceColor
AutoScaleFactor
DisplayName

We give below some examples and peculiarities

CData

h=surf();
c=get(h,'CData');
caxis([0 1]);
for i=1:100
  set(h,'CData',rand(c));
end

FaceColor

This property is classically used to change the shading model of faces and can take the value of a color (string or 3-vector) or a string chose among the values 'none','flat','interp','mean'. This last value does not exist in Matlab and represents the default flat-shading of Scilab, which is an average of vertices color indices.

c=rand(10,10);
pcolor(1:10,1:10,c);
hold on
pcolor(11:20,1:10,c,'FaceColor','mean');
pcolor(21:30,1:10,c,'FaceColor','interp');
hold off
colorbar bot
title 'flat, mean, interp'

Authors

Stéphane Mottelet