The default is 4 ( ' flat ' mode) for surf color_flag = 3 // interpolated shading mode. cdata_mapping = ' direct ' // default is ' scaled ' relative to the colormap e. LineSpec and GlobalProperty examples: Z = close ( winsid ( ) ) // destroy all existing figures surf ( Z, Z + 5 ) // colors array specified e = gce ( ) e. example 3 // X and Y are vectors = > same behavior as sample 1 // With vectors, the grid is inevitably rectangular X = Y = X Z = surf ( X, Y, Z ) X and Y initialisation // NB: here, X has the same lines and Y the same columns X = Y = Z = scf ( 3 ) surf ( X, Y, Z ) Note that all these properties can be (re-)set through the surfaceĮntity properties (see surface_properties). That you can set multiple properties : the face & edge color,Ĭolor data, color data mapping, marker color (foreground andīackground), the visibility, clipping and thickness of the edges of PropertyValue (which can be a string or an integer or.Īs well depending on the type of the PropertyName). It must always be a couple statement constituted of a stringĭefining the PropertyName, and its associated value This option may be used to specify how all the surfaces areĭrawn. Here is a brief description on how it works: GlobalProperty The GlobalProperty arguments should be used to customize Vertices), the last row and column of C are ignored. When 'flat' (default mode) is enabled we use a colorįaceted representation (one color per patch). The color of the vertices defining the patch is set to the given color of we provided only one color per patch) then 'interp' is selected, we perform a bilinear color The FaceColor property sets the shading mode : it canīe 'interp' or 'flat' (default mode). (one color defined per vertex) orĬolor representation also varies when specifying some GlobalPropery: Matrix, the C colors matrix dimension can be The vertices or at the center of each patch. Matrix is given, it can be applied to the patch in two different ways : at Matrices matching the Z matrix dimension (and the grid isĬonsidering the 3 functions x(i,j), y(i,j)Īnd z(i,j), the portion of surface defining between twoīy default, when no colors matrix is added to a surf call, the colors Y are vectors, they are internally treated to produce good (even if X or Y is vector, see below) and can beĬonsidered as 3 functions x(i,j), y(i,j) and This imaginary rectangular grid is used to build the real surface The default axes used is the active gca() one. Handle of the graphical axes where the surface must be drawn. For a complete view of the available properties (see Global objects' properties applied to all the curves created by this (X(j),Y(i)) point of the grid (see description Surf(…) automatically generates matrices fromĪn optional real matrix defining a colors value for each Vectors while fun(…) expects only input matrices, Through a list, as in surf(x,y, list(delip, -0.4)) or If the 2D function fun to plot needs some parametersĪs input arguments, the function and its parameters can be specified Handle of a function, as in surf(x,y, myFun) where theĮxpected syntax of myFun is Z=myFun(X,Y). They define the data grid (horizontal coordinates of the grid nodes).Īll grid cells are quadrangular but not necessarily rectangular.Ī real matrix explicitly defining the heights of nodes, of sizes The arguments of the legend() function are string variables for each line plot, and a number which represents the position where the legend is going to be displayed on the graphic window.Two vectors of real numbers, of lengths nx and ny If we have multiple line plots on the same axes, we need to add also a legend, in order to distinguish between the lines. It has the same syntax as the labels, and displays the string argument as a centered text above the axes. The arguments are string variables representing the text to be displayed.įor the title of the plot we use the title() function. The axes labels are added with xlabel() and ylabel() functions. The default setting for the grid are: black color and dashed lines. The grid is displayed with the function xgrid(). For this we need to enter at the Scilab console the following instructions: To have a complete plot we need to add a grid, labels for both axes, a title and a legend. With every plot() function we add, new line plots are created on the same graphic window. Image: Multiple line plot on the same axes in Scilab
0 Comments
Leave a Reply. |