The other modes are faster, but do not perform a complete redraw and are therefore less accurate. This mode produces the most accurate picture, but is the slowest. normal (the default) - Redraw the affected region of the display, performing the three-dimensional analysis necessary to ensure that all objects are rendered correctly.Alternative erase modes are useful for creating animated sequences, where control of the way individual objects redraw is necessary to improve performance and obtain the desired effect. This property controls the technique MATLAB uses to draw and erase Line objects. Curly braces | none | xor | backgroundĮrase mode. Line Properties This section lists property names along with the type of values each accepts. Where PropertyName is the name of the Line property and PropertyValue is the value you are specifying. Set(gca,'DefaultLine PropertyName', PropertyValue.) Set(gcf,'DefaultLine PropertyName', PropertyValue.) Set(0,'DefaultLine PropertyName', PropertyValue.) Setting Default Properties You can set default Line properties on the Axes, Figure, and Root levels: This also applies to the case when just one or two matrices have one row. If all the data has the same number of columns and one row each, MATLAB transposes the matrices to produce data for plotting. Input Argument Dimensions - Informal Form This statement reuses the one column matrix specified for ZData to produce two lines, each having four points. Hline2 = line(t+.06,sin(t),'LineWidth',4,'Color',) įinally, pop the first Line to the front: Make the shadow Line light gray and wider than the default LineWidth: Next, add a shadow by offsetting the x coordinates. First, plot some data and save the Line's handle: However, Axes properties that are under automatic control such as the axis limits can change to accommodate the Line within the current Axes.Įxamples This example uses the line function to add a shadow to plotted data. It simply adds Line objects to the current Axes. Unlike high-level functions such as plot, line does not respect the setting of the Figure and Axes NextPlot properties. You can specify properties as property name/property value pairs, structure arrays, and cell arrays (see the set and get reference pages for examples of how to specify these data types). You can also set and query property values after creating the Line using set and get. Line properties control various aspects of the Line object and are described in the "Line Properties" section. The low-level form of the line function can have arguments that are only property name/property value paris. You must specify all other properties as name/value pairs. Remarks In its informal form, the line function interprets the first three arguments (two for 2-D) as the X, Y, and Z coordinate data, allowing you to omit the property names. Returns a column vector of handles corresponding to each Line object the function creates. This is the low-level form of the line function, which does not accept matrix coordinate data as the other informal forms described above. line('XData',x,'YData',y,'ZData',z,' PropertyName',PropertyValue.)Ĭreates a Line in the current Axes using the property values defined as arguments. line(X,Y,Z,' PropertyName',PropertyValue.)Ĭreates a Line using the values for the property name/property value pairs specified and default values for all other properties. line(X,Y,Z)Ĭreates Lines in three-dimensional coordinates. If X and Y are matrices of the same size, line draws one Line per column. Note that you cannot specify matrix coordinate data with the low-level form of the line function.Īdds the Line defined in vectors X and Y to the current Axes. MATLAB draws a Line object in the current Axes using the default Line color (see the colordef function for information on color defaults). When you call line with only property name/property value pairs, However, unlike plot, line does not call the newplot function. MATLAB cycles through the Axes ColorOrder and LineStyleOrder property values the way the plot function does. When you specify matrix coordinate data using the informal syntax (i.e., the first three arguments are interpreted as the coordinates), Automatic color and line style cycling.You can specify the color, width, line style, and marker type, as well as other characteristics. Line(' PropertyName',PropertyValue.) Formal-PN/PV pairs onlyĭescription line creates a Line object in the current Axes. Line(X,Y,Z,' PropertyName',PropertyValue.)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |