MATLAB Function Reference (Volume 2: Graphics)
MATLAB Function Reference (Volume 2: Graphics) MATLAB Function Reference (Volume 2: Graphics)
patchCreate the patch by specifying the Faces, Vertices, and FaceVertexCDataproperties as well as the FaceColor property.patch('faces',fac,'vertices',vert,'FaceVertexCData',tcolor,...'FaceColor','flat')V22V31.91.81.71.6Face 11.51.41.31.2Face 21.1V110 0.2 0.4 0.6 0.8 1V4Specifying only unique vertices and their connection matrix can reduce the sizeof the data for patches having many faces. See the descriptions of the Faces,Vertices, and FaceVertexCData properties for information on how to definethem.MATLAB does not require each face to have the same number of vertices. Incases where they do not, pad the Faces matrix with NaNs. To define a patch withfaces that do not close, add one or more NaN to the row in the Vertices matrixthat defines the vertex you do not want connected.ObjectHierarchy2-318
patchRootFigureAxesUicontrolUimenuUicontextmenuImageLightLinePatchRectangleSurfaceTextSetting Default PropertiesYou can set default patch properties on the axes, figure, and root levels.set(0,'DefaultPatchPropertyName',PropertyValue...)set(gcf,'DefaultPatchPropertyName',PropertyValue...)set(gca,'DefaultPatchPropertyName',PropertyValue...)PropertyName is the name of the patch property and PropertyValue is the valueyou are specifying. Use set and get to access patch properties.Property ListThe following table lists all patch properties and provides a brief description ofeach. The property name links take you to an expanded description of theproperties.Property Name Property Description Property ValueData Defining the ObjectFaces Connection matrix for Vertices Values: m-by-n matrixDefault: [1,2,3]VerticesXDataYDataMatrix of x-, y-, and z-coordinates ofthe vertices (used with Faces)The x-coordinates of the vertices ofthe patchThe y-coordinates of the vertices ofthe patchValues: matrixDefault: [0,1;1,1;0,0]Values: vector or matrixDefault: [0;1;0]Values: vector or matrixDefault: [1;1;0]2-319
- Page 297 and 298: Light PropertiesWhen a handle’s v
- Page 299 and 300: lightanglePurpose2lightangleCreate
- Page 301 and 302: linePurpose2lineCreate line objectS
- Page 303 and 304: lineFinally, pop the first line to
- Page 305 and 306: lineProperty Name Property Descript
- Page 307 and 308: lineProperty Name Property Descript
- Page 309 and 310: Line PropertiesCreateFcnstringCallb
- Page 311 and 312: Line PropertiesSetting HandleVisibi
- Page 313 and 314: Line PropertiesMarker Specifierphno
- Page 315 and 316: Line PropertiesZDatavector of coord
- Page 317 and 318: LineSpecLine Style SpecifiersSpecif
- Page 319 and 320: LineSpec• LineWidth - specifies t
- Page 321 and 322: LineSpec10.80.60.40.20−0.2−0.4
- Page 323 and 324: listdlgExampleThis example displays
- Page 325 and 326: loglogExamplesCreate a simple loglo
- Page 327 and 328: materialproperties of all surface a
- Page 329 and 330: mesh, meshc, meshzwireframe with hi
- Page 331 and 332: mesh, meshc, meshzmeshc calls mesh,
- Page 333 and 334: movieExamples Animate the peaks fun
- Page 335 and 336: msgboxPurpose2msgboxDisplay message
- Page 337 and 338: newplotNextPlotreplaceWhat HappensR
- Page 339 and 340: orientPurpose2orientSet paper orien
- Page 341 and 342: pagedlgPurpose2pagedlgDisplay page
- Page 343 and 344: patchPurpose2patchCreate patch grap
- Page 345 and 346: patchColor Data InterpretationYou c
- Page 347: patch2V2 V31.91.8V51.71.61.51.41.31
- Page 351 and 352: patchProperty Name Property Descrip
- Page 353 and 354: patchProperty Name Property Descrip
- Page 355 and 356: Patch PropertiesButtonDownFcn strin
- Page 357 and 358: Patch PropertiesThe second diagram
- Page 359 and 360: Patch PropertiesYou can also set th
- Page 361 and 362: Patch PropertiesFaceColor{ColorSpec
- Page 363 and 364: Patch Properties• An n-by-1 matri
- Page 365 and 366: Patch Propertiesprotect GUIs from c
- Page 367 and 368: Patch PropertiesMarker Specifierd^v
- Page 369 and 370: Patch PropertiesYou can also set th
- Page 371 and 372: pbaspectPurpose2pbaspectSet or quer
- Page 373 and 374: pbaspectIt is also interesting to l
- Page 375 and 376: pbaspect0.50−0.520−2−2020.50
- Page 377 and 378: pcolorExamplesA Hadamard matrix has
- Page 379 and 380: peaksPurpose2peaksA sample function
- Page 381 and 382: pieExamplesEmphasize the second sli
- Page 383 and 384: plotPurpose2plotLinear 2-D plotSynt
- Page 385 and 386: plotproduce this graph.3210−1−2
- Page 387 and 388: plot1Plot of sin(Θ)0.80.60.40.2sin
- Page 389 and 390: plot33530252015105010.510−0.5−1
- Page 391 and 392: plotmatrix50−51050−51050−5−
- Page 393 and 394: plotyy10.500−10 1 2 3 4 5 6 7 −
- Page 395 and 396: polarSee Alsocart2pol, compass, Lin
- Page 397 and 398: print, printoptpcmd and dev are pla
patchCreate the patch by specifying the Faces, Vertices, and FaceVertexCDataproperties as well as the FaceColor property.patch('faces',fac,'vertices',vert,'FaceVertexCData',tcolor,...'FaceColor','flat')V22V31.91.81.71.6Face 11.51.41.31.2Face 21.1V110 0.2 0.4 0.6 0.8 1V4Specifying only unique vertices and their connection matrix can reduce the sizeof the data for patches having many faces. See the descriptions of the Faces,Vertices, and FaceVertexCData properties for information on how to definethem.<strong>MATLAB</strong> does not require each face to have the same number of vertices. Incases where they do not, pad the Faces matrix with NaNs. To define a patch withfaces that do not close, add one or more NaN to the row in the Vertices matrixthat defines the vertex you do not want connected.ObjectHierarchy2-318