creating graphs in r graphing techniques sharon style! (i am not sure if this is a good or bad thing...
TRANSCRIPT
![Page 1: Creating Graphs in R Graphing techniques Sharon style! (I am not sure if this is a good or bad thing but this is what I do...)](https://reader035.vdocument.in/reader035/viewer/2022062801/56649e585503460f94b50cc0/html5/thumbnails/1.jpg)
Creating Graphs in R
Graphing techniques Sharon style!(I am not sure if this is a good or bad thing but this is what I do...)
![Page 2: Creating Graphs in R Graphing techniques Sharon style! (I am not sure if this is a good or bad thing but this is what I do...)](https://reader035.vdocument.in/reader035/viewer/2022062801/56649e585503460f94b50cc0/html5/thumbnails/2.jpg)
Basic graphical tools that I use...
lines(x, y, lty = “solid”, lwd = 1)
points(x , y, pch = 16, cex = 1)
arrows(x0, y0, x1, y1, length, angle, code)
text(x, y, labels, adj)
mtext(text, side, line)
axis(side, at, labels)
![Page 3: Creating Graphs in R Graphing techniques Sharon style! (I am not sure if this is a good or bad thing but this is what I do...)](https://reader035.vdocument.in/reader035/viewer/2022062801/56649e585503460f94b50cc0/html5/thumbnails/3.jpg)
lines() This function is used to add lines to existing
graphs. The different line types are:
![Page 4: Creating Graphs in R Graphing techniques Sharon style! (I am not sure if this is a good or bad thing but this is what I do...)](https://reader035.vdocument.in/reader035/viewer/2022062801/56649e585503460f94b50cc0/html5/thumbnails/4.jpg)
points() This function is used to add points to existing graphs.
Some of the different points are:
![Page 5: Creating Graphs in R Graphing techniques Sharon style! (I am not sure if this is a good or bad thing but this is what I do...)](https://reader035.vdocument.in/reader035/viewer/2022062801/56649e585503460f94b50cc0/html5/thumbnails/5.jpg)
arrows()
code= argument specifies which ends of the arrows have an arrow head. code=1 produces a head at
the start of arrow, code=2 produces a head at
the end of the arrow code=3 produces a head at
both ends.2 4 6 8 10
02
46
810
Index
c(0:10)
![Page 6: Creating Graphs in R Graphing techniques Sharon style! (I am not sure if this is a good or bad thing but this is what I do...)](https://reader035.vdocument.in/reader035/viewer/2022062801/56649e585503460f94b50cc0/html5/thumbnails/6.jpg)
text() text() draws the strings (text) given in the
vector labels at the coordinates given by x and y
Can be added to any part of the graph
![Page 7: Creating Graphs in R Graphing techniques Sharon style! (I am not sure if this is a good or bad thing but this is what I do...)](https://reader035.vdocument.in/reader035/viewer/2022062801/56649e585503460f94b50cc0/html5/thumbnails/7.jpg)
mtext()
Text is written in one of the four margins of the current figure region or one of the outer margins of the device region.
![Page 8: Creating Graphs in R Graphing techniques Sharon style! (I am not sure if this is a good or bad thing but this is what I do...)](https://reader035.vdocument.in/reader035/viewer/2022062801/56649e585503460f94b50cc0/html5/thumbnails/8.jpg)
Elements of the graph lines
points
arrows
text
mtext
axis
![Page 9: Creating Graphs in R Graphing techniques Sharon style! (I am not sure if this is a good or bad thing but this is what I do...)](https://reader035.vdocument.in/reader035/viewer/2022062801/56649e585503460f94b50cc0/html5/thumbnails/9.jpg)
axis() This function give you control over the axis
labels. I use this to add the labels etc that I want on
the graph rather than using the default labels etc.
![Page 10: Creating Graphs in R Graphing techniques Sharon style! (I am not sure if this is a good or bad thing but this is what I do...)](https://reader035.vdocument.in/reader035/viewer/2022062801/56649e585503460f94b50cc0/html5/thumbnails/10.jpg)
adj
![Page 11: Creating Graphs in R Graphing techniques Sharon style! (I am not sure if this is a good or bad thing but this is what I do...)](https://reader035.vdocument.in/reader035/viewer/2022062801/56649e585503460f94b50cc0/html5/thumbnails/11.jpg)
The graph that provided the inspiration
![Page 12: Creating Graphs in R Graphing techniques Sharon style! (I am not sure if this is a good or bad thing but this is what I do...)](https://reader035.vdocument.in/reader035/viewer/2022062801/56649e585503460f94b50cc0/html5/thumbnails/12.jpg)
The most important thing... Plan the process. Prepare your data. Work through getting one step correct before
moving to the next step. Don’t get overwhelmed by trying to do
everything at once. If you don’t succeed – try, try, try, try... again!
![Page 13: Creating Graphs in R Graphing techniques Sharon style! (I am not sure if this is a good or bad thing but this is what I do...)](https://reader035.vdocument.in/reader035/viewer/2022062801/56649e585503460f94b50cc0/html5/thumbnails/13.jpg)
Useful links... http://users.monash.edu.au/~murray/AIMS-R-
users/ws/ws11.html
https://www.stat.auckland.ac.nz/~ihaka/120/Notes/ch03.pdf
www.zoologi.su.se/education/courseweb/statistics/Pimp_Your_Graph.pdf