banner



How To Change Plot Dot Size Matlab

plot

Linear 2-D plot

Syntax

  • plot(Y) plot(X1,Y1,...) plot(X1,Y1,LineSpec,...) plot(...,'PropertyName',PropertyValue,...) h = plot(...)          

Description

plot(Y) plots the columns of Y versus their index if Y is a existent number. If Y is complex, plot(Y) is equivalent to plot(real(Y),imag(Y)). In all other uses of plot, the imaginary component is ignored.

plot(X1,Y1,...) plots all lines defined by Xn versus Yn pairs. If only Xn or Yn is a matrix, the vector is plotted versus the rows or columns of the matrix, depending on whether the vector'south row or column dimension matches the matrix.

plot(X1,Y1,LineSpec,...) plots all lines defined past the Xn,Yn,LineSpec triples, where LineSpec is a line specification that determines line blazon, marker symbol, and colour of the plotted lines. You can mix Xn,Yn,LineSpec triples with Xn,Yn pairs: plot(X1,Y1,X2,Y2,LineSpec,X3,Y3).

plot(...,' PropertyName ',PropertyValue,...) sets properties to the specified belongings values for all line graphics objects created by plot. (See the "Examples" section for examples.)

h = plot(...) returns a cavalcade vector of handles to line graphics objects, one handle per line.

Remarks

If you do not specify a color when plotting more than one line, plot automatically cycles through the colors in the social club specified past the current axes ColorOrder property. After cycling through all the colors defined past ColorOrder, plot and then cycles through the line styles divers in the axes LineStyleOrder property.

Annotation that, by default, MATLAB resets the ColorOrder and LineStyleOrder properties each time you lot phone call plot. If you want changes y'all make to these properties to persist, and then y'all must ascertain these changes as default values. For example,

  • set up(0,'DefaultAxesColorOrder',[0 0 0],...       'DefaultAxesLineStyleOrder','-|-.|--|:')          

sets the default ColorOrder to utilize only the color black and sets the LineStyleOrder to use solid, dash-dot, nuance-dash, and dotted line styles.

Additional Information

  • See the "Creating 2-D Graphs" and "Labeling Graphs" in Using MATLAB Graphics for more information on plotting.
  • Run across LineSpec for more data on specifying line styles and colors.

Examples

Specifying the Color and Size of Markers

You can besides specify other line characteristics using graphics properties (run across line for a description of these backdrop):

  • LineWidth - specifies the width (in points) of the line.
  • MarkerEdgeColor - specifies the color of the marker or the edge color for filled markers (circle, foursquare, diamond, pentagram, hexagram, and the 4 triangles).
  • MarkerFaceColor - specifies the color of the face of filled markers.
  • MarkerSize - specifies the size of the marker in units of points.

For example, these statements,

  • ten = -pi:pi/10:pi; y = tan(sin(x)) - sin(tan(ten)); plot(x,y,'--rs','LineWidth',2,...                 'MarkerEdgeColor','k',...                 'MarkerFaceColor','grand',...                 'MarkerSize',ten)          

produce this graph.

Specifying Tick Mark Location and Labeling

Y'all tin can adjust the centrality tick-mark locations and the labels appearing at each tick. For example, this plot of the sine function relabels the ten-centrality with more than meaningful values,

  • x = -pi:.1:pi; y = sin(x); plot(ten,y) set(gca,'XTick',-pi:pi/2:pi) set up(gca,'XTickLabel',{'-pi','-pi/2','0','pi/2','pi'})          

Now add axis labels and comment the point -pi/4, sin(-pi/4).

Adding Titles, Centrality Labels, and Annotations

MATLAB enables you lot to add axis labels and titles. For example, using the graph from the previous example, add an x- and y-axis characterization,

  •             xlabel('-\pi \leq \Theta \leq \pi')            ylabel('sin(\Theta)')            championship('Plot of sin(\Theta)')            text(-pi/4,sin(-pi/4),'\leftarrow sin(-\pi\div4)',...      'HorizontalAlignment','left')          

Now change the line colour to red by first finding the handle of the line object created by plot and then setting its Colour property. In the aforementioned statement, set the LineWidth property to two points.

  •             set(findobj(gca,'Type','line','Color',[0 0 ane]),...     'Color','red',...     'LineWidth',2)          

See As well

axis, bar, grid, concord, legend, line, LineSpec, loglog , plotyy, semilogx, semilogy , subplot , title , xlabel , xlim , ylabel , ylim , zlabel , zlim, stalk

Come across the text String property for a list of symbols and how to display them.

Meet the Plot Editor for data on plot annotation tools in the figure window toolbar.

See Basic Plots and Graphs for related functions.

 planerot plot3

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

Posted by: espinozaexuld1949.blogspot.com

0 Response to "How To Change Plot Dot Size Matlab"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel