diff --git a/001-minimal.md b/001-minimal.md index 80fcf20..11e9f3e 100644 --- a/001-minimal.md +++ b/001-minimal.md @@ -41,13 +41,13 @@ It is easy. plot(1:10) ``` -![plot of chunk unnamed-chunk-2](http://animation.r-forge.r-project.org/knitr-ex/figure/001-minimal-unnamed-chunk-21.png) +![plot of chunk unnamed-chunk-2](http://db.yihui.name/knitr-examples/figure/001-minimal-unnamed-chunk-2-1.png) ```r hist(rnorm(1000)) ``` -![plot of chunk unnamed-chunk-2](http://animation.r-forge.r-project.org/knitr-ex/figure/001-minimal-unnamed-chunk-22.png) +![plot of chunk unnamed-chunk-2](http://db.yihui.name/knitr-examples/figure/001-minimal-unnamed-chunk-2-2.png) ## inline code diff --git a/002-minimal.tex b/002-minimal.tex index c028925..8154afa 100644 --- a/002-minimal.tex +++ b/002-minimal.tex @@ -80,7 +80,7 @@ \hlkwd{plot}\hlstd{(}\hlkwd{rnorm}\hlstd{(}\hlnum{100}\hlstd{))} \end{alltt} \end{kframe} -\includegraphics[width=\maxwidth]{figure/002-minimal-foo} +\includegraphics[width=\maxwidth]{figure/002-minimal-foo-1} \end{knitrout} diff --git a/003-minimal.html b/003-minimal.html index a368f17..8f6500b 100644 --- a/003-minimal.html +++ b/003-minimal.html @@ -99,10 +99,10 @@
library(ggplot2)
 plot(mpg ~ hp, mtcars)
 
-
plot of chunk html-cars-scatter
+
plot of chunk html-cars-scatter
qplot(hp, mpg, data = mtcars) + geom_smooth()
 
-
plot of chunk html-cars-scatter
+
plot of chunk html-cars-scatter

Errors, messages and warnings can be put into div's with different classes:

@@ -137,7 +137,7 @@
par3d(zoom = 0.7)
 
-
plot of chunk fancy-rgl
+
plot of chunk fancy-rgl

Well, everything seems to be working. Let's ask R what is the value of π? Of course it is 3.1416.

diff --git a/005-latex.tex b/005-latex.tex index d3197b1..6973437 100644 --- a/005-latex.tex +++ b/005-latex.tex @@ -108,7 +108,7 @@ \hlkwd{plot}\hlstd{(cars)} \hlcom{# a scatter plot} \end{alltt} \end{kframe} -\includegraphics[width=.8\textwidth]{figure/latex-cairo-scatter} +\includegraphics[width=.8\textwidth]{figure/latex-cairo-scatter-1} \end{knitrout} diff --git a/006-minimal.rst b/006-minimal.rst index f8c9a2b..2b62871 100644 --- a/006-minimal.rst +++ b/006-minimal.rst @@ -76,7 +76,7 @@ Here is a plot: qplot(hp, mpg, data = mtcars) + geom_smooth() -.. figure:: http://animation.r-forge.r-project.org/knitr-ex/figure/006-minimal-rst-plot.png +.. figure:: http://db.yihui.name/knitr-examples/figure/006-minimal-rst-plot-1.png :alt: A ggplot2 example :width: 360px diff --git a/013-par.tex b/013-par.tex index 80df776..da61ca9 100644 --- a/013-par.tex +++ b/013-par.tex @@ -72,7 +72,7 @@ \hlkwd{hist}\hlstd{(}\hlkwd{rnorm}\hlstd{(}\hlnum{100}\hlstd{),} \hlkwc{main} \hlstd{=} \hlstr{""}\hlstd{)} \hlcom{# no main title} \end{alltt} \end{kframe} -\includegraphics[width=\maxwidth]{figure/013-par-myplot} +\includegraphics[width=\maxwidth]{figure/013-par-myplot-1} \end{knitrout} diff --git a/016-device.tex b/016-device.tex index eac8a11..c463ddf 100644 --- a/016-device.tex +++ b/016-device.tex @@ -59,7 +59,7 @@ \hlkwd{plot}\hlstd{(}\hlnum{1}\hlstd{,} \hlkwc{main} \hlstd{=} \hlstr{"Hello, Palatino"}\hlstd{,} \hlkwc{xlab} \hlstd{=} \hlstr{"This is x-axis"}\hlstd{,} \hlkwc{ylab} \hlstd{=} \hlstr{"This is y-axis"}\hlstd{)} \end{alltt} \end{kframe} -\includegraphics[width=\maxwidth]{figure/016-device-dev-args} +\includegraphics[width=\maxwidth]{figure/016-device-dev-args-1} \end{knitrout} diff --git a/019-fig-caption.tex b/019-fig-caption.tex index 8ad6909..8e66e7d 100644 --- a/019-fig-caption.tex +++ b/019-fig-caption.tex @@ -61,7 +61,7 @@ \end{alltt} \end{kframe}\begin{figure}[] -\includegraphics[width=\maxwidth]{figure/019-fig-caption-test} \caption[]{$2 \times 2$ is 4\label{fig:test}} +\includegraphics[width=\maxwidth]{figure/019-fig-caption-test-1} \caption[]{$2 \times 2$ is 4\label{fig:test}} \end{figure} @@ -90,7 +90,7 @@ \end{alltt} \end{kframe}\begin{figure}[] -\includegraphics[width=\maxwidth]{figure/019-fig-caption-t-test} \caption[The P-value is 0]{The P-value is 0.93\label{fig:t-test}} +\includegraphics[width=\maxwidth]{figure/019-fig-caption-t-test-1} \caption[The P-value is 0]{The P-value is 0.93\label{fig:t-test}} \end{figure} @@ -106,7 +106,7 @@ \end{alltt} \end{kframe}\begin{figure*}[] -\includegraphics[width=\maxwidth]{figure/019-fig-caption-figure-asterisk} \caption[Figure * environment]{Figure * environment.\label{fig:figure-asterisk}} +\includegraphics[width=\maxwidth]{figure/019-fig-caption-figure-asterisk-1} \caption[Figure * environment]{Figure * environment.\label{fig:figure-asterisk}} \end{figure*} @@ -123,7 +123,7 @@ \end{kframe}\begin{figure}[] -{\centering \includegraphics[width=\maxwidth]{figure/019-fig-caption-two-caps1} +{\centering \includegraphics[width=\maxwidth]{figure/019-fig-caption-two-caps-1} } @@ -136,7 +136,7 @@ \end{kframe}\begin{figure}[] -{\centering \includegraphics[width=\maxwidth]{figure/019-fig-caption-two-caps2} +{\centering \includegraphics[width=\maxwidth]{figure/019-fig-caption-two-caps-2} } diff --git a/033-file-extension.tex b/033-file-extension.tex index 5caaf61..7a5cde8 100644 --- a/033-file-extension.tex +++ b/033-file-extension.tex @@ -77,7 +77,7 @@ \hlkwd{plot}\hlstd{(}\hlnum{1}\hlstd{)} \end{alltt} \end{kframe} -\includegraphics[width=\maxwidth]{figure/033-file-extension-test-a.pdf} +\includegraphics[width=\maxwidth]{figure/033-file-extension-test-a-1.pdf} \end{knitrout} @@ -88,7 +88,7 @@ \hlkwd{plot}\hlstd{(}\hlnum{2}\hlstd{)} \end{alltt} \end{kframe} -\includegraphics[width=\maxwidth]{figure/033-file-extension-test-b.png} +\includegraphics[width=\maxwidth]{figure/033-file-extension-test-b-1.png} \end{knitrout} diff --git a/034-chinese.html b/034-chinese.html index 422849f..2fd19ea 100644 --- a/034-chinese.html +++ b/034-chinese.html @@ -76,7 +76,7 @@
plot(mtcars[, 1:2])
 
-
plot of chunk unnamed-chunk-1
+
plot of chunk unnamed-chunk-1

介不是好好的吗?

diff --git a/040-grid-table.tex b/040-grid-table.tex index 96ea5da..82b5159 100644 --- a/040-grid-table.tex +++ b/040-grid-table.tex @@ -74,7 +74,7 @@ \hlkwd{grid.draw}\hlstd{(g)} \end{alltt} \end{kframe} -\includegraphics[width=\maxwidth]{figure/040-grid-table-draw-table} +\includegraphics[width=\maxwidth]{figure/040-grid-table-draw-table-1} \end{knitrout} diff --git a/041-label-i.md b/041-label-i.md index 22463ad..8a45181 100644 --- a/041-label-i.md +++ b/041-label-i.md @@ -17,13 +17,13 @@ This example shows how to generate chunk labels dynamically with the brew syntax hist(mtcars$mpg[mtcars$cyl == 6], main = paste(6, "cylinders")) ``` -![plot of chunk mpg-histogram-6](http://animation.r-forge.r-project.org/knitr-ex/figure/041-label-i-mpg-histogram-6.png) +![plot of chunk mpg-histogram-6](http://db.yihui.name/knitr-examples/figure/041-label-i-mpg-histogram-6-1.png) ```r hist(mtcars$wt[mtcars$cyl == 6], main = paste(6, "cylinders")) ``` -![plot of chunk weight-histogam-6](http://animation.r-forge.r-project.org/knitr-ex/figure/041-label-i-weight-histogam-6.png) +![plot of chunk weight-histogam-6](http://db.yihui.name/knitr-examples/figure/041-label-i-weight-histogam-6-1.png) ### 4 @@ -31,13 +31,13 @@ hist(mtcars$wt[mtcars$cyl == 6], main = paste(6, "cylinders")) hist(mtcars$mpg[mtcars$cyl == 4], main = paste(4, "cylinders")) ``` -![plot of chunk mpg-histogram-4](http://animation.r-forge.r-project.org/knitr-ex/figure/041-label-i-mpg-histogram-4.png) +![plot of chunk mpg-histogram-4](http://db.yihui.name/knitr-examples/figure/041-label-i-mpg-histogram-4-1.png) ```r hist(mtcars$wt[mtcars$cyl == 4], main = paste(4, "cylinders")) ``` -![plot of chunk weight-histogam-4](http://animation.r-forge.r-project.org/knitr-ex/figure/041-label-i-weight-histogam-4.png) +![plot of chunk weight-histogam-4](http://db.yihui.name/knitr-examples/figure/041-label-i-weight-histogam-4-1.png) ### 8 @@ -45,10 +45,10 @@ hist(mtcars$wt[mtcars$cyl == 4], main = paste(4, "cylinders")) hist(mtcars$mpg[mtcars$cyl == 8], main = paste(8, "cylinders")) ``` -![plot of chunk mpg-histogram-8](http://animation.r-forge.r-project.org/knitr-ex/figure/041-label-i-mpg-histogram-8.png) +![plot of chunk mpg-histogram-8](http://db.yihui.name/knitr-examples/figure/041-label-i-mpg-histogram-8-1.png) ```r hist(mtcars$wt[mtcars$cyl == 8], main = paste(8, "cylinders")) ``` -![plot of chunk weight-histogam-8](http://animation.r-forge.r-project.org/knitr-ex/figure/041-label-i-weight-histogam-8.png) +![plot of chunk weight-histogam-8](http://db.yihui.name/knitr-examples/figure/041-label-i-weight-histogam-8-1.png) diff --git a/048-cars-demo.tex b/048-cars-demo.tex index c7c0826..7c54b26 100644 --- a/048-cars-demo.tex +++ b/048-cars-demo.tex @@ -69,7 +69,7 @@ \end{alltt} \end{kframe} -{\centering \includegraphics[width=\maxwidth]{figure/048-cars-demo-model} +{\centering \includegraphics[width=\maxwidth]{figure/048-cars-demo-model-1} } diff --git a/049-cars-demo.md b/049-cars-demo.md index 1c0f8ad..b15af97 100644 --- a/049-cars-demo.md +++ b/049-cars-demo.md @@ -12,6 +12,6 @@ fit <- lm(dist ~ speed, data = cars) abline(fit, lwd = 2) ``` -![plot of chunk model](http://animation.r-forge.r-project.org/knitr-ex/figure/049-cars-demo-model.png) +![plot of chunk model](http://db.yihui.name/knitr-examples/figure/049-cars-demo-model-1.png) The slope of a simple linear regression is 3.9324. diff --git a/050-allowframebreaks.tex b/050-allowframebreaks.tex index f327224..b5786b1 100644 --- a/050-allowframebreaks.tex +++ b/050-allowframebreaks.tex @@ -72,7 +72,7 @@ ## step> utils::example("lm", echo = FALSE) \end{verbatim} -\includegraphics[width=.7\linewidth]{figure/050-allowframebreaks-step0} +\includegraphics[width=.7\linewidth]{figure/050-allowframebreaks-step0-1} \begin{verbatim} ## ## step> ## End Don't show diff --git a/053-beamer-only.tex b/053-beamer-only.tex index 6b6f712..16b48fb 100644 --- a/053-beamer-only.tex +++ b/053-beamer-only.tex @@ -75,9 +75,9 @@ \end{alltt} \end{kframe} -{\centering \only<1>{\includegraphics[width=.5\linewidth]{figure/053-beamer-only-boring-plots1}} -\only<2>{\includegraphics[width=.5\linewidth]{figure/053-beamer-only-boring-plots2}} -\only<3>{\includegraphics[width=.5\linewidth]{figure/053-beamer-only-boring-plots3}} +{\centering \only<1>{\includegraphics[width=.5\linewidth]{figure/053-beamer-only-boring-plots-1}} +\only<2>{\includegraphics[width=.5\linewidth]{figure/053-beamer-only-boring-plots-2}} +\only<3>{\includegraphics[width=.5\linewidth]{figure/053-beamer-only-boring-plots-3}} } diff --git a/054-loop-plots.md b/054-loop-plots.md index 003af3d..68ce6d3 100644 --- a/054-loop-plots.md +++ b/054-loop-plots.md @@ -12,20 +12,20 @@ for (i in 1:5) { this is plot 1 -![](http://animation.r-forge.r-project.org/knitr-ex/figure/054-loop-plots-loop1.png) +![](http://db.yihui.name/knitr-examples/figure/054-loop-plots-loop-1.png) this is plot 2 -![](http://animation.r-forge.r-project.org/knitr-ex/figure/054-loop-plots-loop2.png) +![](http://db.yihui.name/knitr-examples/figure/054-loop-plots-loop-2.png) this is plot 3 -![](http://animation.r-forge.r-project.org/knitr-ex/figure/054-loop-plots-loop3.png) +![](http://db.yihui.name/knitr-examples/figure/054-loop-plots-loop-3.png) this is plot 4 -![](http://animation.r-forge.r-project.org/knitr-ex/figure/054-loop-plots-loop4.png) +![](http://db.yihui.name/knitr-examples/figure/054-loop-plots-loop-4.png) this is plot 5 -![](http://animation.r-forge.r-project.org/knitr-ex/figure/054-loop-plots-loop5.png) +![](http://db.yihui.name/knitr-examples/figure/054-loop-plots-loop-5.png) diff --git a/055-multicols.tex b/055-multicols.tex index df0b178..09f920b 100644 --- a/055-multicols.tex +++ b/055-multicols.tex @@ -79,7 +79,7 @@ \hlkwd{plot}\hlstd{(}\hlkwd{rnorm}\hlstd{(}\hlnum{100}\hlstd{))} \end{alltt} \end{kframe} -\includegraphics[width=\maxwidth]{figure/055-multicols-test} +\includegraphics[width=\maxwidth]{figure/055-multicols-test-1} \end{knitrout} diff --git a/063-html5-figure.md b/063-html5-figure.md index 6288edb..14bbf5a 100644 --- a/063-html5-figure.md +++ b/063-html5-figure.md @@ -18,6 +18,6 @@ Test: plot(rnorm(100)) ``` -
Some random numbers.
+
Some random numbers.
This is a very simple-minded `plot` hook; you should take a look at [knitr's default definition](https://github.com/yihui/knitr/blob/master/R/hooks-md.R) if you want to improve this hook function. diff --git a/064-bib-plot.tex b/064-bib-plot.tex index 90e89bc..6fcb6bc 100644 --- a/064-bib-plot.tex +++ b/064-bib-plot.tex @@ -61,7 +61,7 @@ \hlkwd{plot}\hlstd{(}\hlkwd{rnorm}\hlstd{(}\hlnum{100}\hlstd{),} \hlkwc{xlab} \hlstd{=} \hlstr{"See \textbackslash{}\textbackslash{}cite\{lamport94\} for details"}\hlstd{)} \end{alltt} \end{kframe} -\input{figure/064-bib-plot-bib-plot.tikz} +\input{figure/064-bib-plot-bib-plot-1.tikz} \end{knitrout} diff --git a/067-graphics-options.tex b/067-graphics-options.tex index 3a9469f..544f7c8 100644 --- a/067-graphics-options.tex +++ b/067-graphics-options.tex @@ -76,7 +76,7 @@ \end{alltt} \end{kframe}\begin{figure}[H] -\includegraphics[width=2in]{figure/067-graphics-options-fig-cap1} \caption[One plot]{One plot.\label{fig:fig-cap1}} +\includegraphics[width=2in]{figure/067-graphics-options-fig-cap-1} \caption[One plot]{One plot.\label{fig:fig-cap1}} \end{figure} \begin{kframe}\begin{alltt} @@ -84,7 +84,7 @@ \end{alltt} \end{kframe}\begin{figure}[H] -\includegraphics[width=2in]{figure/067-graphics-options-fig-cap2} \caption[Another plot]{Another plot.\label{fig:fig-cap2}} +\includegraphics[width=2in]{figure/067-graphics-options-fig-cap-2} \caption[Another plot]{Another plot.\label{fig:fig-cap2}} \end{figure} @@ -99,12 +99,12 @@ \hlkwd{plot}\hlstd{(}\hlnum{1}\hlopt{:}\hlnum{10}\hlstd{)} \end{alltt} \end{kframe} -\includegraphics[width=1in]{figure/067-graphics-options-fig-out1} +\includegraphics[width=1in]{figure/067-graphics-options-fig-out-1} \begin{kframe}\begin{alltt} \hlkwd{plot}\hlstd{(}\hlkwd{rnorm}\hlstd{(}\hlnum{10}\hlstd{),} \hlkwc{pch} \hlstd{=} \hlnum{19}\hlstd{)} \end{alltt} \end{kframe} -\includegraphics[width=.4\linewidth]{figure/067-graphics-options-fig-out2} +\includegraphics[width=.4\linewidth]{figure/067-graphics-options-fig-out-2} \end{knitrout} @@ -117,12 +117,12 @@ \hlkwd{plot}\hlstd{(}\hlnum{1}\hlopt{:}\hlnum{10}\hlstd{)} \end{alltt} \end{kframe} -\includegraphics[width=2in,angle=30]{figure/067-graphics-options-fig-extra1} +\includegraphics[width=2in,angle=30]{figure/067-graphics-options-fig-extra-1} \begin{kframe}\begin{alltt} \hlkwd{plot}\hlstd{(}\hlkwd{rnorm}\hlstd{(}\hlnum{10}\hlstd{),} \hlkwc{pch} \hlstd{=} \hlnum{19}\hlstd{)} \end{alltt} \end{kframe} -\includegraphics[width=2in,angle=120]{figure/067-graphics-options-fig-extra2} +\includegraphics[width=2in,angle=120]{figure/067-graphics-options-fig-extra-2} \end{knitrout} @@ -136,12 +136,12 @@ \hlkwd{plot}\hlstd{(}\hlnum{1}\hlopt{:}\hlnum{10}\hlstd{)} \end{alltt} \end{kframe} -\includegraphics[width=1in]{figure/067-graphics-options-fig-width1} +\includegraphics[width=1in]{figure/067-graphics-options-fig-width-1} \begin{kframe}\begin{alltt} \hlkwd{plot}\hlstd{(}\hlkwd{rnorm}\hlstd{(}\hlnum{10}\hlstd{),} \hlkwc{pch} \hlstd{=} \hlnum{19}\hlstd{)} \end{alltt} \end{kframe} -\includegraphics[width=1in]{figure/067-graphics-options-fig-width2} +\includegraphics[width=1in]{figure/067-graphics-options-fig-width-2} \end{knitrout} @@ -161,9 +161,9 @@ \end{alltt} \end{kframe}\begin{figure}[H] \subfloat[one plot\label{fig:fig-sub1}]{ -\includegraphics[width=.49\linewidth]{figure/067-graphics-options-fig-sub1} } +\includegraphics[width=.49\linewidth]{figure/067-graphics-options-fig-sub-1} } \subfloat[the other one\label{fig:fig-sub2}]{ -\includegraphics[width=.49\linewidth]{figure/067-graphics-options-fig-sub2} }\caption[two plots]{two plots\label{fig:fig-sub}} +\includegraphics[width=.49\linewidth]{figure/067-graphics-options-fig-sub-2} }\caption[two plots]{two plots\label{fig:fig-sub}} \end{figure} @@ -179,7 +179,7 @@ \end{alltt} \end{kframe}\begin{figure}[H] -\includegraphics[width=2in]{figure/067-graphics-options-fig-margin1} \caption[ordinary figure]{ordinary figure\label{fig:fig-margin1}} +\includegraphics[width=2in]{figure/067-graphics-options-fig-margin-1} \caption[ordinary figure]{ordinary figure\label{fig:fig-margin1}} \end{figure} \begin{kframe}\begin{alltt} @@ -187,7 +187,7 @@ \end{alltt} \end{kframe}\begin{sidewaysfigure}[H] -\includegraphics[width=2in]{figure/067-graphics-options-fig-margin2} \caption[sideways figure]{sideways figure\label{fig:fig-margin2}} +\includegraphics[width=2in]{figure/067-graphics-options-fig-margin-2} \caption[sideways figure]{sideways figure\label{fig:fig-margin2}} \end{sidewaysfigure} diff --git a/068-beamer-simple.tex b/068-beamer-simple.tex index d600eb3..f3dd5a1 100644 --- a/068-beamer-simple.tex +++ b/068-beamer-simple.tex @@ -73,7 +73,7 @@ \end{alltt} \end{kframe} -{\centering \includegraphics[width=.6\linewidth]{figure/068-beamer-simple-test} +{\centering \includegraphics[width=.6\linewidth]{figure/068-beamer-simple-test-1} } diff --git a/069-for-loop.tex b/069-for-loop.tex index 92dfece..5a99048 100644 --- a/069-for-loop.tex +++ b/069-for-loop.tex @@ -76,7 +76,7 @@ \section{Now i is 1} \hlkwd{boxplot}\hlstd{(iris[,} \hlnum{1}\hlstd{]} \hlopt{~} \hlstd{iris}\hlopt{$}\hlstd{Species)} \end{alltt} \end{kframe} -\includegraphics[width=\maxwidth]{figure/069-for-loop-arbitrary-chunk-label-1-here} +\includegraphics[width=\maxwidth]{figure/069-for-loop-arbitrary-chunk-label-1-here-1} \end{knitrout} \section{Now i is 2} @@ -100,7 +100,7 @@ \section{Now i is 2} \hlkwd{boxplot}\hlstd{(iris[,} \hlnum{2}\hlstd{]} \hlopt{~} \hlstd{iris}\hlopt{$}\hlstd{Species)} \end{alltt} \end{kframe} -\includegraphics[width=\maxwidth]{figure/069-for-loop-arbitrary-chunk-label-2-here} +\includegraphics[width=\maxwidth]{figure/069-for-loop-arbitrary-chunk-label-2-here-1} \end{knitrout} \section{Now i is 3} @@ -124,7 +124,7 @@ \section{Now i is 3} \hlkwd{boxplot}\hlstd{(iris[,} \hlnum{3}\hlstd{]} \hlopt{~} \hlstd{iris}\hlopt{$}\hlstd{Species)} \end{alltt} \end{kframe} -\includegraphics[width=\maxwidth]{figure/069-for-loop-arbitrary-chunk-label-3-here} +\includegraphics[width=\maxwidth]{figure/069-for-loop-arbitrary-chunk-label-3-here-1} \end{knitrout} diff --git a/070-caption-num.md b/070-caption-num.md index 3eb2fdb..977db0d 100644 --- a/070-caption-num.md +++ b/070-caption-num.md @@ -7,11 +7,11 @@ plot(1:10) ``` -![Figure 1: this is one plot](http://animation.r-forge.r-project.org/knitr-ex/figure/070-caption-num-test-a.png) +![Figure 1: this is one plot](http://db.yihui.name/knitr-examples/figure/070-caption-num-test-a-1.png) ```r plot(rnorm(10)) ``` -![Figure 2: another plot](http://animation.r-forge.r-project.org/knitr-ex/figure/070-caption-num-test-b.png) +![Figure 2: another plot](http://db.yihui.name/knitr-examples/figure/070-caption-num-test-b-1.png) diff --git a/072-latex-reference.tex b/072-latex-reference.tex index 2f2dda1..34c2385 100644 --- a/072-latex-reference.tex +++ b/072-latex-reference.tex @@ -64,7 +64,7 @@ \end{alltt} \end{kframe}\begin{figure}[] -\includegraphics[width=\maxwidth]{figure/072-latex-reference-example} \caption[some figure]{some figure\label{fig:example}} +\includegraphics[width=\maxwidth]{figure/072-latex-reference-example-1} \caption[some figure]{some figure\label{fig:example}} \end{figure} diff --git a/083-ggplot2-reference.md b/083-ggplot2-reference.md index 663473a..71656a8 100644 --- a/083-ggplot2-reference.md +++ b/083-ggplot2-reference.md @@ -25,7 +25,7 @@ qplot(carat, price, data = diamonds, color = cut) + theme(legend.text = element_ angle = 45)) + theme(legend.position = "bottom") ``` -![plot of chunk test-a](http://animation.r-forge.r-project.org/knitr-ex/figure/083-ggplot2-reference-test-a.png) +![plot of chunk test-a](http://db.yihui.name/knitr-examples/figure/083-ggplot2-reference-test-a-1.png) Another test: @@ -39,4 +39,4 @@ qplot(carat, data = diamonds, fill = cut) + theme(legend.text = element_text(siz ## stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this. ``` -![plot of chunk test-b](http://animation.r-forge.r-project.org/knitr-ex/figure/083-ggplot2-reference-test-b.png) +![plot of chunk test-b](http://db.yihui.name/knitr-examples/figure/083-ggplot2-reference-test-b-1.png) diff --git a/084-pandoc.md b/084-pandoc.md index 3ffe047..8196e25 100644 --- a/084-pandoc.md +++ b/084-pandoc.md @@ -79,7 +79,7 @@ par(mfrow = c(2, 2), pch = 20, mar = c(4, 4, 2, 0.1), bg = "white") plot(fit) ``` -![Regression diagnostics](http://animation.r-forge.r-project.org/knitr-ex/figure/084-pandoc-lm-vis.png) +![Regression diagnostics](http://db.yihui.name/knitr-examples/figure/084-pandoc-lm-vis-1.png) # A little bit math diff --git a/085-pdfcrop.tex b/085-pdfcrop.tex index 49b3aa0..bb728f4 100644 --- a/085-pdfcrop.tex +++ b/085-pdfcrop.tex @@ -70,7 +70,7 @@ \hlkwd{plot}\hlstd{(}\hlnum{1}\hlstd{)} \end{alltt} \end{kframe} -\includegraphics[width=\maxwidth]{figure/085-pdfcrop-test-b} +\includegraphics[width=\maxwidth]{figure/085-pdfcrop-test-b-1} \end{knitrout} \end{document} diff --git a/087-child-example.tex b/087-child-example.tex index 4560678..766ee5a 100644 --- a/087-child-example.tex +++ b/087-child-example.tex @@ -100,12 +100,12 @@ \hlkwd{plot}\hlstd{(}\hlnum{1}\hlstd{)} \end{alltt} \end{kframe} -\includegraphics[width=2in]{figure/087-child-example-test-child1} +\includegraphics[width=2in]{figure/087-child-example-test-child-1} \begin{kframe}\begin{alltt} \hlkwd{boxplot}\hlstd{(}\hlnum{1}\hlopt{:}\hlnum{10}\hlstd{)} \end{alltt} \end{kframe} -\includegraphics[width=2in]{figure/087-child-example-test-child2} +\includegraphics[width=2in]{figure/087-child-example-test-child-2} \begin{kframe}\begin{alltt} \hlkwd{str}\hlstd{(mtcars)} \end{alltt} diff --git a/088-pandoc-embedded.md b/088-pandoc-embedded.md index a90e44e..a2bc15e 100644 --- a/088-pandoc-embedded.md +++ b/088-pandoc-embedded.md @@ -89,7 +89,7 @@ par(mfrow = c(2, 2), pch = 20, mar = c(4, 4, 2, 0.1), bg = "white") plot(fit) ``` -![Regression diagnostics](http://animation.r-forge.r-project.org/knitr-ex/figure/088-pandoc-embedded-lm-vis.png) +![Regression diagnostics](http://db.yihui.name/knitr-examples/figure/088-pandoc-embedded-lm-vis-1.png) # A little bit math diff --git a/089-minimal.txt b/089-minimal.txt index 29ebbe5..cb341da 100644 --- a/089-minimal.txt +++ b/089-minimal.txt @@ -93,6 +93,6 @@ par(mar = c(4, 4, 0.1, 0.1)) plot(cars, pch = 19) ---- .A wonderful plot. -image::figure/089-minimal-cool-plot.png[A wonderful plot.,align=default] +image::figure/089-minimal-cool-plot-1.png[A wonderful plot.,align=default] Ready to get started? diff --git a/092-latex-rgl.tex b/092-latex-rgl.tex index f9b2e65..3439447 100644 --- a/092-latex-rgl.tex +++ b/092-latex-rgl.tex @@ -88,7 +88,7 @@ \end{alltt} \end{kframe} -{\centering \includegraphics[width=3in]{figure/092-latex-rgl-fancy-rgl} +{\centering \includegraphics[width=3in]{figure/092-latex-rgl-fancy-rgl-1} } diff --git a/101-cache-levels.md b/101-cache-levels.md index f578b6c..18b0ef6 100644 --- a/101-cache-levels.md +++ b/101-cache-levels.md @@ -16,7 +16,7 @@ Sys.sleep(1) plot(cars) ``` -![plot of chunk test-cache-a](http://animation.r-forge.r-project.org/knitr-ex/figure/101-cache-levels-test-cache-a.png) +![plot of chunk test-cache-a](http://db.yihui.name/knitr-examples/figure/101-cache-levels-test-cache-a-1.png) `cache=1` means to save the results from `evaluate::evaluate()`, and pretend the code has been evaluated; all the output hooks will be applied every time @@ -37,7 +37,7 @@ Sys.sleep(1) plot(cars) ``` -![plot of chunk test-cache-b](http://animation.r-forge.r-project.org/knitr-ex/figure/101-cache-levels-test-cache-b.png) +![plot of chunk test-cache-b](http://db.yihui.name/knitr-examples/figure/101-cache-levels-test-cache-b-1.png) `cache=2` is similar to `cache=1`, and the only difference is that the plots will not be redrawn, in which case you need to make sure you did not delete @@ -57,7 +57,7 @@ Sys.sleep(1) plot(cars) ``` -![plot of chunk test-cache-c](http://animation.r-forge.r-project.org/knitr-ex/figure/101-cache-levels-test-cache-c.png) +![plot of chunk test-cache-c](http://db.yihui.name/knitr-examples/figure/101-cache-levels-test-cache-c-1.png) `cache=TRUE` or `cache=3` means to cache the text output of a chunk; none of the output hooks will be called when the document is recompiled, and the @@ -86,7 +86,7 @@ Below is a test case for [#588](https://github.com/yihui/knitr/issues/588): pairs(matrix(rnorm(100), ncol = 100), labels = 1:100, pch = ".") ``` -![plot of chunk test-cache-e](http://animation.r-forge.r-project.org/knitr-ex/figure/101-cache-levels-test-cache-e.png) +![plot of chunk test-cache-e](http://db.yihui.name/knitr-examples/figure/101-cache-levels-test-cache-e-1.png) Another test case, with more plots: @@ -97,10 +97,10 @@ plot(1:10) abline(0, 1) ``` -![plot of chunk test-cache-f](http://animation.r-forge.r-project.org/knitr-ex/figure/101-cache-levels-test-cache-f1.png) +![plot of chunk test-cache-f](http://db.yihui.name/knitr-examples/figure/101-cache-levels-test-cache-f-1.png) ```r plot(2:11) ``` -![plot of chunk test-cache-f](http://animation.r-forge.r-project.org/knitr-ex/figure/101-cache-levels-test-cache-f2.png) +![plot of chunk test-cache-f](http://db.yihui.name/knitr-examples/figure/101-cache-levels-test-cache-f-2.png) diff --git a/103-move-float.tex b/103-move-float.tex index e541ddd..3f4a711 100644 --- a/103-move-float.tex +++ b/103-move-float.tex @@ -97,7 +97,7 @@ \end{knitrout} \begin{figure} -\includegraphics[width=\maxwidth]{figure/103-move-float-example-a} +\includegraphics[width=\maxwidth]{figure/103-move-float-example-a-1} \caption{A figure caption here, and you must label it!\label{fig:example-a}} \end{figure} diff --git a/104-subfigure.tex b/104-subfigure.tex index a49abfc..33590a4 100644 --- a/104-subfigure.tex +++ b/104-subfigure.tex @@ -58,13 +58,13 @@ \begin{figure} \begin{subfigure}{.5\textwidth} -\includegraphics[width=\maxwidth]{figure/104-subfigure-test-a} +\includegraphics[width=\maxwidth]{figure/104-subfigure-test-a-1} \caption{This is Figure a. \label{fig:test-a}} \end{subfigure} \begin{subfigure}{.5\textwidth} -\includegraphics[width=\maxwidth]{figure/104-subfigure-test-b} +\includegraphics[width=\maxwidth]{figure/104-subfigure-test-b-1} \caption{This is Figure b. \label{fig:test-b}} \end{subfigure} diff --git a/105-minimal.textile b/105-minimal.textile index f7d84ea..ca3311a 100644 --- a/105-minimal.textile +++ b/105-minimal.textile @@ -34,7 +34,7 @@ bc(knitr r source#test-b).. plot(x, pch = 20, type = "o", col = "red") p(knitr_end). -!http://animation.r-forge.r-project.org/knitr-ex/figure/105-minimal-test-b.png(A random walk.)! +!http://db.yihui.name/knitr-examples/figure/105-minimal-test-b-1.png(A random walk.)! p(knitr plot caption#test-b). A random walk. diff --git a/108-animation-scianimator.md b/108-animation-scianimator.md index d7ca2a5..1c435cd 100644 --- a/108-animation-scianimator.md +++ b/108-animation-scianimator.md @@ -42,7 +42,7 @@ for (i in 1:20) { var imgs = Array(20); for (i=0; ; i++) { if (i == imgs.length) break; - imgs[i] = "http://animation.r-forge.r-project.org/knitr-ex/figure/108-animation-scianimator-test" + (i + 1) + ".png"; + imgs[i] = "http://db.yihui.name/knitr-examples/figure/108-animation-scianimator-test-" + (i + 1) + ".png"; } $("#test").scianimator({ "images": imgs,