|
|
@ -2,15 +2,27 @@ |
|
|
|
#+AUTHOR: Marc Pohling |
|
|
|
|
|
|
|
Needs debian package ess |
|
|
|
#+begin_src R :session *R* :results output graphics :file second.png :exports both |
|
|
|
#+begin_src R :results output graphics :file test.png |
|
|
|
library(ggplot2) |
|
|
|
x <- (0:100)/100 |
|
|
|
y <- x^2 |
|
|
|
qplot(x,y,geom="line",xlab=expression(x),ylab=expression(f(x)==x^2), |
|
|
|
main="Quadratfunktion") |
|
|
|
|
|
|
|
df <- data.frame(dose=c("D0.5", "D1", "D2"), |
|
|
|
len=c(4.2, 10, 29.5)) |
|
|
|
# Basic line plot with points |
|
|
|
ggplot(data=df, aes(x=dose, y=len, group=1)) + |
|
|
|
geom_line()+ |
|
|
|
geom_point() |
|
|
|
# Change the line type |
|
|
|
ggplot(data=df, aes(x=dose, y=len, group=1)) + |
|
|
|
geom_line(linetype = "dashed")+ |
|
|
|
geom_point() |
|
|
|
# Change the color |
|
|
|
ggplot(data=df, aes(x=dose, y=len, group=1)) + |
|
|
|
geom_line(color="red")+ |
|
|
|
geom_point() |
|
|
|
#+end_src |
|
|
|
|
|
|
|
#+RESULTS: |
|
|
|
[[file:test.png]] |
|
|
|
|
|
|
|
* Personal Information |
|
|
|
|
|
|
|