This shows how to dynamically generate a plot in R+ggplot2, then embed it into a latex document, and compile it to pdf, all with proper autodependencies.
7 lines
145 B
Text
7 lines
145 B
Text
redo-ifchange mpg.R
|
|
Rscript mpg.R >&2
|
|
mv mpg.new.eps $3
|
|
|
|
# Some buggy ggplot2 versions produce this
|
|
# junk file; throw it away.
|
|
rm -f Rplots.pdf
|