Welcome to Code Sharer, a code gallery for creating, saving and sharing all kinds of code snippets.

Snips Tagged "plot" 6 results found

Plotting a basic graph in R from a ASCII file R 526
Author: Ryan Bradley-Evans (Admin) Posted On: Sunday, November 2, 2014 at 5:01 AM

test.dat is the name of the ASCII saved in the working directory.

common graph types are; "p" for points, "l" for lines, "b" for both, "c" for the lines part alone of "b", "o" for both ?overplotted?, "h" for ?histogram? like (or ?high-density?) vertical lines, "s" for stair steps, "n" for no plotting.




Simple Graph Plotting R 386
Author: Matt Posted On: Monday, November 3, 2014 at 9:30 PM


This is just a simple introduction to plotting graphs in R.





'type="l"' = line plot graph type

'xlab' and 'ylab' = x and y labels


'main' = title of graph

Regression line R 425
Author: Ryan Bradley-Evans (Admin) Posted On: Thursday, November 27, 2014 at 6:44 PM

Plot a regression line in R and print the summary of the regression line.





Error bars. R 377
Author: Ryan Bradley-Evans (Admin) Posted On: Friday, November 28, 2014 at 2:12 AM

Plot error bars for both x and y in R 

Heart Graph R 600
Author: Ryan Bradley-Evans (Admin) Posted On: Tuesday, December 2, 2014 at 11:27 AM

"lwd" is the width of the line
Heart R plot

Christmas Tree R 481
Author: Ryan Bradley-Evans (Admin) Posted On: Tuesday, December 2, 2014 at 11:54 AM

Plots a Christmas tree with decorations in random places along the branches. try running the same code a few times to see for your self!


xmas tree