CSC103 Plotting with R

From dftwiki3
Revision as of 15:14, 29 September 2013 by Thiebaut (talk | contribs) (Source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

--D. Thiebaut (talk) 16:13, 29 September 2013 (EDT)


Generating Plots with R

R is a free statistical package that can be used to quickly generate simple but nice looking graphs.

The graphs below were generated for the class notes in CSC103. The code is included.


Plots of Exponential Growth


CSC103 ExponentialGrowth1.png       CSC103 ExponentialGrowth4.png


Source


png(filename="/Users/thiebaut/Desktop/expGrowth4.png" )
x=1:64
y=2^(x-1)
plot(x,y, main="Exponential Growth", xlab="Square", ylab="Number of Grains", pch=15 )
dev.off()
plot(x,y, main="Exponential Growth", xlab="Square", ylab="Number of Grains", pch=15 )