Unknown college 14 days punch notes Day5

# Basic drawing functions
? Plot
? PAR ## global function,
Plot (mtcars $ wt, $ mtcars the DISP)
Plot (mtcars $ wt)
Plot (mtcars)
Plot (mtcars $ wt, $ mtcars the DISP, of the type = 'the p-')
Plot (mtcars wt $, $ mtcars DISP, type = 'L')
Order (mtcars $ wt) of ## wt mtcars performed in ascending order, returns wt rows in mtcars coordinates after sorting
mtcars <- mtcars [order (mtcars $ wt),]
mtcars ## wt was visible mtca in ascending order of the
## visible plot (mtcars $ wt, mtcars $ disp, type = 'l') have a fold line in FIG. law of
Plot (mtcars $ wt, mtcars $ DISP, type = 'B')
Plot (mtcars $ wt, mtcars $ DISP, type = 'O')
Plot (mtcars $ wt, mtcars $ DISP, type = 'H' )
Plot (mtcars wt $, $ mtcars DISP, type = 'S')
Plot (mtcars wt $, $ mtcars DISP, type = 'S')
PAR (mfrow = C (3,3)) is displayed in a note # FIG on the
plot (mtcars $ wt, mtcars $ disp,type = 'l')
plot(mtcars$wt,mtcars$disp,type = 'b')
plot(mtcars$wt,mtcars$disp,type = 'o')
plot(mtcars$wt,mtcars$disp,type = 'h')
plot(mtcars$wt,mtcars$disp,type = 's')


plot (mtcars $ wt, mtcars $ disp, type = 'S') ## continues to operate, it will fill up later in FIG
plot (mtcars $ wt, mtcars $ disp, type = 'b')

## Click the lower right box 'broom' can restore the three rows of three boxes into a single page

#pch parameters: 0, block; 2, triangular
Plot (mtcars wt $, $ mtcars DISP, type = 'B', PCH = 0)
Plot (mtcars wt $, $ mtcars DISP, type = 'B', PCH = 2)

#cex, the dot size control
plot (mtcars $ wt, mtcars $ disp, type = 'b', pch = 2, cex = 0.5)

#lty, when drawing a line graph line type specified
Plot (mtcars wt $, $ mtcars DISP, type = 'L', = LTY. 1)
Plot (mtcars wt $, $ mtcars DISP, type = 'L', LTY = 2)

## lwd, the line size of the control
plot (mtcars $ wt, mtcars $ disp, type = 'l', lty = 2, lwd = 2)

#col, color control
Plot (mtcars wt $, $ mtcars DISP, type = 'L', LTY = 2, LWD = 2, COL = 'Blue')
Plot (mtcars wt $, $ mtcars DISP, type = 'L' , lty = 2, lwd = 2 , col = 4) # only 1-8
Plot (mtcars wt $, $ mtcars DISP, type = 'L', LTY = 2, LWD = 2, COL = '# 0000FF') ## hex
plot (mtcars $ wt, mtcars $ disp, type = 'l', lty = 2, lwd = 2, col = rgb (red = 0, green = 0, blue = 1))

##xlim ylim
plot(mtcars$wt,mtcars$disp,type='l',lty=2,lwd=2,col='blue',xlim = c(3,4),ylim = c(200,300))

#main, title
plot (mtcars $ wt, mtcars $ disp, type = 'l', lty = 2, lwd = 2, col = 'blue', main = 'wt and line graph disp')
Plot (wt $ mtcars , mtcars $ disp, type = ' l', lty = 2, lwd = 2, col = 'blue', main = 'wt and disp line graph', sub = '2019-9-21')

# xlab, ylab to the x and y axes labeled
plot (mtcars $ wt, mtcars $ disp, type = 'l', lty = 2, lwd = 2, col = 'blue', main = 'wt and the disp FIG polyline ', sub =' 2019-9-21 ', xlab =' wt ', ylab =' diss')

 

# 5 job ----------------------------------------------- ----------------------
#. 1,
Plot (MPG mtcars $, $ mtcars QseC, PCH =. 8)

2 #,
Library (readxl)
Stock <-read_excel ( 'E: / desktop shortcut file storage / A207 / 2019 summer vacation / task 2 / Institute of unknown / unknown college job /stock.xlsx')
View (Stock)

3 #,
Plot (Stock $ DATE, Stock $ investor_confidence_index, of the type = 'L', main = 'Investor Confidence Index timing diagram')

 

Guess you like

Origin www.cnblogs.com/chayibaishanlqy/p/11574859.html