>Plot (1:8,type= "n", Ylim=c (1,6))
>X0<-c (1,2,3,5,6)
>Y0<-rep (1,5)
>X1<-x0
>Y1<-rep (6,5)
>Segments (X0,Y0,X1,Y1)
>X0<-rep (0,4)
>Y0<-seq (1.3,4.3,1)
>X1<-c (1,6,3,1)
>Y1<-y0
#默认情形
>Segments (x0,y0,x1,y0,lwd=10,col= "Red")
#修改参数lend =1
>Y0<-seq (1.6,4.6,1)
>Y1<-y0
>Segments (x0,y0,x1,y0,lwd=10,col= "Green", lend=1)
#修改参数lend =2
>Y0<-seq (1.9,4.9,1)
>Y1<-y0
>X0<-x1
>X1<-c (2,8,5,3)
>Segments (x0,y0,x1,y0,lwd=10,col= "Blue", lend=2)
-
Lty. Line type. The values of the arguments can be integers (0 is empty, 1 is solid (the default), 2 is dashed, 3 is dotted, 4, 5, 6, and so on), or it can be a string (and the integer is one by one, such as "blank", "solid", "dashed"、 "dotted"、 "dotdash"、 "longdash" or "twodash" ).
-
Lwd Line width. Must be an integer with a default value of 1. The specific implementation depends on the device, and some drawing devices do not support line widths less than 1.
-
Mfcol,mrow. Used to set the layout of the image device (simply by separating the current drawing device into a NR*NC sub-device), with the Parameter form C (NR, NC). The plot order of the sub-graph is either Mfcol or Mfrow, depending on whether the parameter is specified by column or by row. You can also use function layout or split.screen to achieve the same functionality.
-
Mgp Sets the distance between the title, axis name, and axis distance from the drawing border. The default value is C (3,1,0), where the first value affects the caption.
-
New Logical value, the default value is False. If set to true, the next Advanced drawing command does not empty the current drawing device.
-
Oma. The Parameter form is C (bottom, left, top, right), which is used to set the outer boundary.
-
Omi As with the parameter OMA, only the units of this parameter are in inches.
-
Pch. A shape that represents a point whose value can be numeric (a numeric value between 0 and 25) or a character type. 1 represents a circle, 2 represents a triangle, and 3 represents a "+" sign. When the value of the PCH is a character type, then the point is represented by that character.
-
Pin The current dimension, in Form C (width,height), in inches.
-
Plt. In the form c(x1, x2, y1, y2) , set the current drawing area.
-
Pty A character parameter that represents the shape of the current drawing area, and "s" means that a square area is generated, and "M" represents the largest drawing area.
-
Srt. string rotation in degrees, only the function text is supported.
-
Tck The length of the tick mark, which is a fraction less than or equal, represents a portion of the height or width of the drawing area (whichever is smaller in height or width). If tck=1, the grid lines are drawn. The default value is Na (equivalent to tcl=-0.5).
-
Tcl. It can also be used to set the length of a tick mark, but differs from the unit of TCK. Its default value is-0.5.
-
Usr. A vector of form C (x1, x2, y1, y2) that represents the range of coordinate values for the current drawing area: C (Xleft, Xright, Ybottom, ytop). If the logarithmic scale is used (such as par ("xlog") =true), then the x-axis representation range is 10^par ("usr") [1:2], and the y-axis can also be represented.
-
Xaxp. A vector of form C (x1, x2, N) that represents the number of tick marks in the x-axis and the range of ticks in the interval when par ("Xlog") is =false. If par ("xlog") =true, the situation is slightly more complicated: if the range of values is small, then n is a negative number, and the distribution of tick marks is similar to normal (no logarithmic conversion), if n is a value of 1, 2, 3, C (x1,x2) =10^par ("usr") [1:2] (and at this time par ("usr") refers to the value returned by par ("xlog") =true case). The specific explanations are as follows: