Basic drawing System
• Drawing function (graphics package)
- plot/hist(histogram)/boxplot(Box map)/Point (points)/lines(line)/text (add text)/Title/axis(add axis)
-The calling function enables a graphics device and plots on the device
• Basic drawing system + screen equipment
· plot ()
- plot (x, y,... )
-Important parameters:xlab/ylab/lwd(width of line)/lty(type of line)/ PCH(style of point)/col(color)
· par ()
-Used to set global parameters (for all plot plots in R)
· BG(background color)/Mar(and margin of border)/las(Word layout)/mfrow(divides the artboard into rows and columns, fills by rows)/Mfcol (Filled by column)
-These parameters can be modified before each plot
Using the LM () curve fitting, abline () adds the fit curve fit to the diagram, Legend () adds a legend, and TopRight indicates that the legend is added to the upper-right corner.
If you do not modify the value of the Mfrow, you will have the following result
Lattice drawing system
• Drawing functions
-lattice Bag
xyplot (Scatter chart)/Bwplot/histogram (histogram)/Stripplot/dotplot (point map)/Splom/levelplot/contourplot
· Format:xyplot (y~x|f*g,data)
R Language Learning Note 6