Joke Collection Website - News headlines - In R language, how to adjust the distance between coordinate scale number and coordinate axis?
In R language, how to adjust the distance between coordinate scale number and coordinate axis?
Many high-level graphs of R contain coordinate axes themselves. In addition, you can use the low-level graphic function axis () to set your own coordinate axis. Coordinate axis mainly includes three parts: axis (line format is controlled by graphic parameter lty), scale line (dividing scale on axis) and scale label (marking unit on scale). These parts can be set by the following graphic parameters. The first two parameters of lab = c (5,7, 12) are the expected scale intervals on the X axis and the Y axis, respectively. The character length (including decimal point) of the third parameter scale mark. Setting this parameter too small will cause all labels to become the same number. Las= 1 tick mark direction. 0 means always parallel to the coordinate axis, 1 means always horizontal, and 2 means always perpendicular to the coordinate axis. Mgp=c(3, 1,0)。 The first parameter is the distance between the axis label and the axis position, with the text line as the reference unit. The second parameter represents the distance of the scale line, and the last parameter is the distance from the axis position to the axis (usually 0). Positive values are out of the chart and negative values are in the chart. Tck=0.0 1 ruler length, measured by the ratio of drawing area size. When tck is small (less than 0.5), the scales on the X axis and Y axis are forced to be the same size. When the value is 1, the grid lines are given. The negative torque is not in the diagram. Tck=0.0 1, mgp=c( 1,-1.5,0) indicates the internal scale. Xaxs="r"yaxs="i "Set the form of X axis and Y axis respectively. Both the "I" (intrinsic) and "R" (default) scales are applicable to the data range, but the "R" scale will leave some gaps on both sides of the scale range (S has some scales that are not implemented in R).
- Related articles
- Why don’t young people nowadays have Western festivals?
- How to translate the COVID-19 epidemic?
- What constellation does careful skating belong to?
- Anti-cult propaganda slogans hand-copied newspaper content
- How about Jiangxi Huihai Printing Co., Ltd.?
- Summary of bank consumer rights work
- What did "Iron Lady" Thatcher do and why was she criticized for "splitting Britain"?
- When did the Xinzhou epidemic begin?
- School slogans to prevent myopia
- Contents of patriotic handwritten newspaper