banner



How Can Change Edge Width In Patch In Matlab

Patch Properties
Modifying Properties

Yous can gear up and query graphics object properties in two means:

  • The Property Editor is an interactive tool that enables yous to meet and change object holding values.
  • The set and get commands enable you lot to set and query the values of backdrop

To change the default value of properties see Setting Default Belongings Values.

Patch Holding Descriptions

This section lists property names along with the type of values each accepts. Curly braces { } enclose default values.

AlphaDataMapping none | direct | {scaled}

Transparency mapping method. This belongings determines how MATLAB interprets indexed alpha information. This property tin be whatsoever of the following:

  • none - The transparency values of FaceVertexAlphaData are between 0 and 1 or are clamped to this range (the default).
  • scaled - Transform the FaceVertexAlphaData to span the portion of the alphamap indicated by the axes ALim property, linearly mapping data values to blastoff values.
  • direct - apply the FaceVertexAlphaData every bit indices directly into the alphamap. When not scaled, the data are unremarkably integer values ranging from 1 to length(alphamap). MATLAB maps values less than 1 to the first blastoff value in the alphamap, and values greater than length(alphamap) to the last alpha value in the alphamap. Values with a decimal portion are stock-still to the nearest, lower integer. If FaceVertexAlphaData is an array unit8 integers, then the indexing begins at 0 (i.e., MATLAB maps a value of 0 to the first alpha value in the alphamap).
AmbientStrength scalar >= 0 and <= 1

Strength of ambient light. This property sets the strength of the ambient low-cal, which is a nondirectional light source that illuminates the unabridged scene. Y'all must have at least one visible calorie-free object in the axes for the ambient light to be visible. The axes AmbientColor property sets the colour of the ambience light, which is therefore the aforementioned on all objects in the axes.

Yous can also set up the strength of the diffuse and specular contribution of light objects. See the DiffuseStrength and SpecularStrength backdrop.

BackFaceLighting unlit | lit | {reverselit}

Face lighting control. This property determines how faces are lit when their vertex normals point away from the camera:

  • unlit - face is non lit
  • lit - face lit in normal way
  • reverselit - face is lit as if the vertex pointed towards the photographic camera

This holding is useful for discriminating between the internal and external surfaces of an object. See the Using MATLAB Graphics manual for an example.

BusyAction cancel | {queue}

Callback routine intermission. The BusyAction holding enables you lot to control how MATLAB handles events that potentially interrupt executing callback routines. If in that location is a callback routine executing, subsequently invoked callback routes always attempt to interrupt information technology. If the Interruptible property of the object whose callback is executing is set to on (the default), and so interruption occurs at the adjacent point where the consequence queue is processed. If the Interruptible holding is off, the BusyAction property (of the object owning the executing callback) determines how MATLAB handles the event. The choices are:

  • cancel - discard the issue that attempted to execute a second callback routine.
  • queue - queue the upshot that attempted to execute a 2nd callback routine until the current callback finishes.
ButtonDownFcn string or function handle

Push button press callback routine. A callback routine that executes whenever yous printing a mouse button while the pointer is over the patch object. Ascertain this routine as a string that is a valid MATLAB expression or the name of an M-file. The expression executes in the MATLAB workspace.

Run across Function Handle Callbacks for information on how to use function handles to define the callback function.

CData scalar, vector, or matrix

Patch colors. This property specifies the color of the patch. You tin specify colour for each vertex, each face, or a single color for the entire patch. The manner MATLAB interprets CData depends on the blazon of data supplied. The information tin can exist numeric values that are scaled to map linearly into the current colormap, integer values that are used directly as indices into the current colormap, or arrays of RGB values. RGB values are not mapped into the current colormap, just interpreted as the colors defined. On true color systems, MATLAB uses the actual colors defined by the RGB triples. On pseudocolor systems, MATLAB uses dithering to approximate the RGB triples using the colors in the figure'south Colormap and Dithermap.

The following 2 diagrams illustrate the dimensions of CData with respect to the coordinate data arrays, XData, YData, and ZData. The beginning diagram illustrates the utilise of indexed colour.

The second diagram illustrates the use of truthful color. True colour requires thou-by-n-by-3 arrays to define red, green, and bluish components for each color.

Note that if CData contains NaNs, MATLAB does not color the faces.

See as well the Faces, Vertices, and FaceVertexCData backdrop for an alternative method of patch definition.

CDataMapping {scaled} | direct

Direct or scaled color mapping. This property determines how MATLAB interprets indexed colour data used to color the patch. (If you use truthful colour specification for CData or FaceVertexCData, this property has no event.)

  • scaled - transform the color data to bridge the portion of the colormap indicated by the axes CLim property, linearly mapping data values to colors. See the caxis command for more than information on this mapping.
  • directly - apply the colour data equally indices directly into the colormap. When not scaled, the information are ordinarily integer values ranging from 1 to length(colormap). MATLAB maps values less than 1 to the first color in the colormap, and values greater than length(colormap) to the last color in the colormap. Values with a decimal portion are fixed to the nearest, lower integer.
Children matrix of handles

Always the empty matrix; patch objects have no children.

Clipping {on} | off

Clipping to axes rectangle. When Clipping is on, MATLAB does not display any portion of the patch outside the axes rectangle.

CreateFcn string or office handle

Callback routine executed during object cosmos. This property defines a callback routine that executes when MATLAB creates a patch object. You must ascertain this property as a default value for patches. For example, the argument,

  • fix(0,'DefaultPatchCreateFcn','set(gcf,''DitherMap'',my_dither_m ap)')          

defines a default value on the root level that sets the figure DitherMap property whenever y'all create a patch object. MATLAB executes this routine after setting all properties for the patch created. Setting this property on an existing patch object has no effect.

The handle of the object whose CreateFcn is being executed is accessible only through the root CallbackObject holding, which you tin can query using gcbo.

Come across Function Handle Callbacks for information on how to employ office handles to define the callback role.

DeleteFcn string or part handle

Delete patch callback routine. A callback routine that executes when you delete the patch object (due east.g., when yous issue a delete command or clear the axes (cla) or figure (clf) containing the patch). MATLAB executes the routine before deleting the object's properties so these values are available to the callback routine.

The handle of the object whose DeleteFcn is being executed is accessible only through the root CallbackObject property, which you can query using gcbo.

Run across Function Handle Callbacks for information on how to apply part handles to define the callback function.

DiffuseStrength scalar >= 0 and <= 1

Intensity of diffuse light. This property sets the intensity of the diffuse component of the light falling on the patch. Diffuse light comes from light objects in the axes.

You tin can likewise set the intensity of the ambient and specular components of the light on the patch object. Come across the AmbientStrength and SpecularStrength properties.

EdgeAlpha { scalar = 1} | flat | interp

Transparency of the edges of patch faces. This belongings can be any of the following:

  • scalar - A single non-Nan scalar value betwixt 0 and i that controls the transparency of all the edges of the object. ane (the default) is fully opaque and 0 means completely transparent.
  • flat - The alpha information (FaceVertexAlphaData) of each vertex controls the transparency of the border that follows information technology.
  • interp - Linear interpolation of the blastoff data (FaceVertexAlphaData) at each vertex determines the transparency of the edge.

Notation that y'all cannot specify flat or interp EdgeAlpha without starting time setting FaceVertexAlphaData to a matrix containing ane alpha value per face (flat) or one alpha value per vertex (interp).

EdgeColor {ColorSpec} | none | flat | interp

Colour of the patch edge. This property determines how MATLAB colors the edges of the private faces that make up the patch.

  • ColorSpec - A three-chemical element RGB vector or one of the MATLAB predefined names, specifying a single color for edges. The default edge color is black. See ColorSpec for more information on specifying color.
  • none - Edges are non drawn.
  • flat - The color of each vertex controls the color of the border that follows it. This means flat edge coloring is dependent on the gild you specify the vertices:

  • interp - Linear interpolation of the CData or FaceVertexCData values at the vertices determines the edge colour.
EdgeLighting {none} | flat | gouraud | phong

Algorithm used for lighting calculations. This property selects the algorithm used to summate the outcome of light objects on patch edges. Choices are:

  • none - Lights do not affect the edges of this object.
  • apartment - The effect of light objects is uniform across each edge of the patch.
  • gouraud - The consequence of light objects is calculated at the vertices and then linearly interpolated across the edge lines.
  • phong - The event of lite objects is determined by interpolating the vertex normals across each edge line and calculating the reflectance at each pixel. Phong lighting generally produces better results than Gouraud lighting, simply takes longer to render.
EraseMode {normal} | none | xor | background

Erase mode. This holding controls the technique MATLAB uses to draw and erase patch objects. Culling erase modes are useful in creating animated sequences, where control of the way individual objects redraw is necessary to improve operation and obtain the desired effect.

  • normal - Redraw the affected region of the display, performing the three-dimensional assay necessary to ensure that all objects are rendered correctly. This style produces the most accurate picture, just is the slowest. The other modes are faster, but do not perform a complete redraw and are therefore less accurate.
  • none - Do not erase the patch when it is moved or destroyed. While the object is still visible on the screen later on erasing with EraseMode none, you lot cannot print it because MATLAB stores no information about its former location.
  • xor- Draw and erase the patch past performing an exclusive OR (XOR) with each pixel index of the screen behind it. Erasing the patch does non damage the color of the objects behind it. Nonetheless, patch color depends on the color of the screen backside it and is correctly colored but when over the axes background Color, or the effigy background Colour if the axes Colour is fix to none.
  • background - Erase the patch by cartoon it in the axes' groundwork Colour, or the figure background Color if the axes Colour is set to none. This damages objects that are behind the erased patch, but the patch is always properly colored.

    Press with Non-normal Erase Modes

MATLAB always prints figures as if the EraseMode of all objects is normal. This means graphics objects created with EraseMode set to none, xor, or background tin can look different on screen than on paper. On screen, MATLAB may mathematically combine layers of colors (e.thousand., XORing a pixel color with that of the pixel backside it) and ignore iii-dimensional sorting to obtain greater rendering speed. However, these techniques are not applied to the printed output.

You lot tin can use the MATLAB getframe command or other screen capture awarding to create an paradigm of a figure containing non-normal manner objects.

FaceAlpha {scalar = ane} | flat | interp

Transparency of the patch face. This belongings can be whatsoever of the following:

  • A scalar - A single non-NaN scalar value between 0 and i that controls the transparency of all the faces of the object. 1 (the default) is fully opaque and 0 is completely transparent (invisible).
  • apartment - The values of the alpha data (FaceVertexAlphaData) make up one's mind the transparency for each face up. The alpha data at the get-go vertex determines the transparency of the entire face.
  • interp - Bilinear interpolation of the blastoff data (FaceVertexAlphaData) at each vertex determine the transparency of each face.

Annotation that y'all cannot specify flat or interp FaceAlpha without first setting FaceVertexAlphaData to a matrix containing one alpha value per face (flat) or one alpha value per vertex (interp).

FaceColor { ColorSpec } | none | apartment | interp

Color of the patch face. This property can exist any of the post-obit:

  • ColorSpec - A three-chemical element RGB vector or 1 of the MATLAB predefined names, specifying a single color for faces. Meet ColorSpec for more data on specifying color.
  • none - Do not depict faces. Annotation that edges are drawn independently of faces.
  • flat - The values of CData or FaceVertexCData determine the color for each face in the patch. The color information at the first vertex determines the colour of the entire face up.
  • interp - Bilinear interpolation of the color at each vertex determines the coloring of each face up.
FaceLighting {none} | flat | gouraud | phong

Algorithm used for lighting calculations. This belongings selects the algorithm used to calculate the outcome of lite objects on patch faces. Choices are:

  • none - Lights do not impact the faces of this object.
  • flat - The event of lite objects is uniform across the faces of the patch. Select this choice to view faceted objects.
  • gouraud - The result of light objects is calculated at the vertices and then linearly interpolated beyond the faces. Select this choice to view curved surfaces.
  • phong - The outcome of light objects is adamant by interpolating the vertex normals across each face and calculating the reflectance at each pixel. Select this choice to view curved surfaces. Phong lighting generally produces improve results than Gouraud lighting, but takes longer to render.
Faces grand-past-n matrix

Vertex connectedness defining each face up. This property is the connection matrix specifying which vertices in the Vertices property are connected. The Faces matrix defines thousand faces with upwards to n vertices each. Each row designates the connections for a single face, and the number of elements in that row that are not NaN defines the number of vertices for that face.

The Faces and Vertices properties provide an alternative manner to specify a patch that can be more efficient than using x, y, and z coordinates in about cases. For example, consider the following patch. Information technology is equanimous of viii triangular faces defined past 9 vertices.

The respective Faces and Vertices backdrop are shown to the right of the patch. Annotation how some faces share vertices with other faces. For case, the fifth vertex (V5) is used six times, once each by faces one, two, and three and six, 7, and eight. Without sharing vertices, this same patch requires 24 vertex definitions.

FaceVertexAlphaData thou-by-1 matrix

Face and vertex transparency data. The FaceVertexAlphaData property specifies the tranparency of patches defined by the Faces and Vertices properties. The interpretation of the values specified for FaceVertexAlphaData depends on the dimensions of the data.

FaceVertexAlphaData can be one of the following:

  • A unmarried value, which applies the same transparency to the entire patch.
  • An one thousand-by-1 matrix (where k is the number of rows in the Faces holding), which specifies ane transparency value per face.
  • An chiliad-by-1 matrix (where m is the number of rows in the Vertices property), which specifies one transparency value per vertex.
FaceVertexCData matrix

Confront and vertex colors. The FaceVertexCData property specifies the color of patches defined by the Faces and Vertices properties, and the values are used when FaceColor, EdgeColor, MarkerFaceColor, or MarkerEdgeColor are gear up appropriately. The interpretation of the values specified for FaceVertexCData depends on the dimensions of the information.

For indexed colors, FaceVertexCData can be:

  • A unmarried value, which applies a single color to the entire patch
  • An n-by-1 matrix, where n is the number of rows in the Faces property, which specifies one color per face
  • An n-by-i matrix, where n is the number of rows in the Vertices property, which specifies i color per vertex

For true colors, FaceVertexCData tin be:

  • A 1-by-iii matrix , which applies a single color to the unabridged patch
  • An n-by-3 matrix, where n is the number of rows in the Faces property, which specifies one color per face
  • An due north-past-three matrix, where northward is the number of rows in the Vertices belongings, which specifies one color per vertex

The following diagram illustrates the various forms of the FaceVertexCData property for a patch having 8 faces and nine vertices. The CDataMapping holding determines how MATLAB interprets the FaceVertexCData property when you specify indexed colors.

HandleVisibility {on} | callback | off

Command admission to object'southward handle past control-line users and GUIs. This property determines when an object's handle is visible in its parent'due south listing of children. HandleVisibility is useful for preventing control-line users from accidentally drawing into or deleting a figure that contains only user interface devices (such as a dialog box).

Handles are always visible when HandleVisibility is on.

Setting HandleVisibility to callback causes handles to be visible from within callback routines or functions invoked by callback routines, but not from inside functions invoked from the command line. This provides a means to protect GUIs from control-line users, while allowing callback routines to have complete access to object handles.

Setting HandleVisibility to off makes handles invisible at all times. This may be necessary when a callback routine invokes a function that might potentially damage the GUI (such as evaluating a user-typed cord), and so temporarily hides its ain handles during the execution of that function.

When a handle is non visible in its parent's list of children, it cannot exist returned past functions that obtain handles by searching the object hierarchy or querying handle backdrop. This includes become, findobj, gca, gcf, gco, newplot, cla, clf, and close.

When a handle's visibility is restricted using callback or off, the object's handle does not announced in its parent'southward Children property, figures do non appear in the root's CurrentFigure property, objects practise not appear in the root's CallbackObject property or in the effigy'due south CurrentObject property, and axes do not appear in their parent's Currentaxes property.

You can set the root ShowHiddenHandles property to on to make all handles visible, regardless of their HandleVisibility settings (this does not affect the values of the HandleVisibility properties).

Handles that are hidden are still valid. If you know an object'south handle, you can ready and get its backdrop, and pass it to any part that operates on handles.

HitTest {on} | off

Selectable by mouse click. HitTest determines if the patch can become the current object (as returned by the gco command and the figure CurrentObject property) as a result of a mouse click on the patch. If HitTest is off, clicking on the patch selects the object below it (which maybe the axes containing it).

Interruptible {on} | off

Callback routine interruption manner. The Interruptible property controls whether a patch callback routine can be interrupted by subsequently invoked callback routines. Only callback routines divers for the ButtonDownFcn are affected past the Interruptible belongings. MATLAB checks for events that can interrupt a callback routine but when it encounters a drawnow, figure, getframe, or pause control in the routine. Meet the BusyAction property for related information.

LineStyle {-} | -- | : | -. | none

Border linestyle. This holding specifies the line way of the patch edges. The following table lists the bachelor line styles.

Symbol
Line Manner
-
solid line (default)
--
dashed line
:
dotted line
-.
dash-dot line
none
no line

You can apply LineStyle none when you want to identify a marking at each point merely exercise not want the points connected with a line (encounter the Marker property).

LineWidth scalar

Edge line width. The width, in points, of the patch edges (one point = i/72 inch). The default LineWidth is 0.5 points.

Mark graphic symbol (meet table)

Marker symbol. The Marker property specifies marks that locate vertices. You can set values for the Marker property independently from the LineStyle property. The following tables lists the available markers.

Marker Specifier
Description
+
plus sign
o
circle
*
asterisk
.
point
x
cross
s
square
d
diamond
^
upward pointing triangle
v
down pointing triangle
>
correct pointing triangle
<
left pointing triangle
p
5-pointed star (pentagram)
h
half-dozen-pointed star (hexagram)
none
no marker (default)
MarkerEdgeColor ColorSpec | none | {auto} | apartment

Marker edge color. The color of the marker or the edge colour for filled markers (circle, square, diamond, pentagram, hexagram, and the 4 triangles).

  • ColorSpec - defines the color to use.
  • none - specifies no color, which makes nonfilled markers invisible.
  • auto - sets MarkerEdgeColor to the aforementioned color as the EdgeColor property.
MarkerFaceColor ColorSpec | {none} | auto | flat

Marker face up colour. The fill color for markers that are airtight shapes (circle, square, diamond, pentagram, hexagram, and the four triangles).

  • ColorSpec - defines the color to apply.
  • none - makes the interior of the marker transparent, assuasive the background to show through.
  • auto - sets the make full colour to the axes colour, or the effigy color, if the axes Color holding is set up to none.
MarkerSize size in points

Marker size. A scalar specifying the size of the marker, in points. The default value for MarkerSize is six points (1 indicate = 1/72 inch). Note that MATLAB draws the bespeak mark at 1/3 of the specified size.

NormalMode {auto} | transmission

MATLAB-generated or user-specified normal vectors. When this property is car, MATLAB calculates vertex normals based on the coordinate data. If you lot specify your ain vertex normals, MATLAB sets this holding to manual and does not generate its own information. See likewise the VertexNormals property.

Parent axes handle

Patch's parent. The handle of the patch's parent object. The parent of a patch object is the axes in which it is displayed. You can motility a patch object to another axes by setting this property to the handle of the new parent.

Selected on | {off}

Is object selected? When this holding is on, MATLAB displays selection handles or a dashed box (depending on the number of faces) if the SelectionHighlight holding is also on. Yous tin can, for case, define the ButtonDownFcn to set this holding, assuasive users to select the object with the mouse.

SelectionHighlight {on} | off

Objects highlight when selected. When the Selected property is on, MATLAB indicates the selected land past:

  • Drawing handles at each vertex for a unmarried-faced patch.
  • Drawing a dashed bounding box for a multi-faced patch.

When SelectionHighlight is off, MATLAB does not draw the handles.

SpecularColorReflectance scalar in the range 0 to one

Color of specularly reflected calorie-free. When this property is 0, the colour of the specularly reflected light depends on both the color of the object from which it reflects and the color of the light source. When fix to ane, the colour of the specularly reflected light depends only on the color or the low-cal source (i.e., the light object Color property). The proportions vary linearly for values in between.

SpecularExponent scalar >= 1

Harshness of specular reflection. This property controls the size of the specular spot. Nigh materials take exponents in the range of 5 to 20.

SpecularStrength scalar >= 0 and <= ane

Intensity of specular light. This property sets the intensity of the specular component of the light falling on the patch. Specular light comes from calorie-free objects in the axes.

You tin also ready the intensity of the ambient and diffuse components of the lite on the patch object. See the AmbientStrength and DiffuseStrength properties.

Tag cord

User-specified object label. The Tag holding provides a ways to identify graphics objects with a user-specified characterization. This is particularly useful when constructing interactive graphics programs that would otherwise demand to define object handles every bit global variables or pass them every bit arguments betwixt callback routines.

For instance, suppose you lot use patch objects to create borders for a group of uicontrol objects and want to modify the colour of the borders in a uicontrol's callback routine. You can specify a Tag with the patch definition:

  • patch(X,Y,'chiliad','Tag','PatchBorder')          

Then apply findobj in the uicontrol's callback routine to obtain the handle of the patch and set its FaceColor property.

  • ready(findobj('Tag','PatchBorder'),'FaceColor','w')          
Blazon string (read just)

Class of the graphics object. For patch objects, Type is ever the string ' patch '.

UIContextMenu handle of a uicontextmenu object

Associate a context menu with the patch. Assign this holding the handle of a uicontextmenu object created in the same effigy as the patch. Use the uicontextmenu function to create the context menu. MATLAB displays the context menu whenever yous right-click over the patch.

UserData matrix

User-specified data. Any matrix you want to associate with the patch object. MATLAB does not employ this data, but y'all can access information technology using set and get .

VertexNormals matrix

Surface normal vectors. This property contains the vertex normals for the patch. MATLAB generates this information to perform lighting calculations. Y'all tin supply your own vertex normal information, fifty-fifty if it does not match the coordinate information. This tin be useful to produce interesting lighting effects.

Vertices matrix

Vertex coordinates. A matrix containing the x-, y-, z-coordinates for each vertex. See the Faces property for more than information.

Visible {on} | off

Patch object visibility. By default, all patches are visible. When set to off, the patch is non visible, but nonetheless exists and you lot can query and set its properties.

XData vector or matrix

Ten-coordinates. The x-coordinates of the patch vertices. If XData is a matrix, each column represents the x-coordinates of a single confront of the patch. In this case, XData, YData, and ZData must have the same dimensions.

YData vector or matrix

Y-coordinates. The y-coordinates of the patch vertices. If YData is a matrix, each column represents the y-coordinates of a unmarried face of the patch. In this case, XData, YData, and ZData must take the same dimensions.

ZData vector or matrix

Z-coordinates. The z-coordinates of the patch vertices. If ZData is a matrix, each column represents the z-coordinates of a single face up of the patch. In this example, XData, YData, and ZData must take the aforementioned dimensions.

See Also

patch

 patch path

Source: http://www.ece.northwestern.edu/local-apps/matlabhelp/techdoc/ref/patch_props.html

Posted by: harrisfromment63.blogspot.com

0 Response to "How Can Change Edge Width In Patch In Matlab"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel