Skip to content

Commit d76fe69

Browse files
committed
the demo bivar has been removed from the rgl package
1 parent cd01db7 commit d76fe69

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

003-minimal.Rhtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<!--begin.rcode html-cars-scatter, message=FALSE, fig.align='center', warning=FALSE
3333
library(ggplot2)
3434
plot(mpg~hp, mtcars)
35-
qplot(hp, mpg, data=mtcars)+geom_smooth()
35+
ggplot(mtcars, aes(hp, mpg))+geom_smooth()
3636
end.rcode-->
3737

3838
<p>Errors, messages and warnings can be put into <code>div</code>'s
@@ -53,8 +53,8 @@
5353
end.rcode-->
5454

5555
<!--begin.rcode fancy-rgl, rgl=TRUE, fig.align='center', fig.width=4, fig.height=4, warning=FALSE
56-
demo('bivar', package='rgl', echo=FALSE)
57-
par3d(zoom=.7)
56+
plot3d(data.frame(x = rnorm(100), y = rnorm(100), z = rnorm(100)), col = rainbow(100))
57+
par3d(zoom=.8)
5858
end.rcode-->
5959

6060
<p>Well, everything seems to be working. Let's ask R what is the

003-minimal.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
<span class="hl kwd">plot</span><span class="hl std">(mpg</span> <span class="hl opt">~</span> <span class="hl std">hp, mtcars)</span>
101101
</pre></div>
102102
</div><div class="rimage center"><img src="https://db.yihui.org/knitr-examples/figure/003-minimal-html-cars-scatter-1.png" alt="plot of chunk html-cars-scatter" class="plot" /></div><div class="rcode">
103-
<div class="source"><pre class="knitr r"><span class="hl kwd">qplot</span><span class="hl std">(hp, mpg,</span> <span class="hl kwc">data</span> <span class="hl std">= mtcars)</span> <span class="hl opt">+</span> <span class="hl kwd">geom_smooth</span><span class="hl std">()</span>
103+
<div class="source"><pre class="knitr r"><span class="hl kwd">ggplot</span><span class="hl std">(mtcars,</span> <span class="hl kwd">aes</span><span class="hl std">(hp, mpg))</span> <span class="hl opt">+</span> <span class="hl kwd">geom_smooth</span><span class="hl std">()</span>
104104
</pre></div>
105105
</div><div class="rimage center"><img src="https://db.yihui.org/knitr-examples/figure/003-minimal-html-cars-scatter-2.png" alt="plot of chunk html-cars-scatter" class="plot" /></div></div>
106106

@@ -131,8 +131,8 @@
131131
</pre></div>
132132
</div></div>
133133

134-
<div class="chunk" id="fancy-rgl"><div class="rcode"><div class="source"><pre class="knitr r"><span class="hl kwd">demo</span><span class="hl std">(</span><span class="hl str">&quot;bivar&quot;</span><span class="hl std">,</span> <span class="hl kwc">package</span> <span class="hl std">=</span> <span class="hl str">&quot;rgl&quot;</span><span class="hl std">,</span> <span class="hl kwc">echo</span> <span class="hl std">=</span> <span class="hl num">FALSE</span><span class="hl std">)</span>
135-
<span class="hl kwd">par3d</span><span class="hl std">(</span><span class="hl kwc">zoom</span> <span class="hl std">=</span> <span class="hl num">0.7</span><span class="hl std">)</span>
134+
<div class="chunk" id="fancy-rgl"><div class="rcode"><div class="source"><pre class="knitr r"><span class="hl kwd">plot3d</span><span class="hl std">(</span><span class="hl kwd">data.frame</span><span class="hl std">(</span><span class="hl kwc">x</span> <span class="hl std">=</span> <span class="hl kwd">rnorm</span><span class="hl std">(</span><span class="hl num">100</span><span class="hl std">),</span> <span class="hl kwc">y</span> <span class="hl std">=</span> <span class="hl kwd">rnorm</span><span class="hl std">(</span><span class="hl num">100</span><span class="hl std">),</span> <span class="hl kwc">z</span> <span class="hl std">=</span> <span class="hl kwd">rnorm</span><span class="hl std">(</span><span class="hl num">100</span><span class="hl std">)),</span> <span class="hl kwc">col</span> <span class="hl std">=</span> <span class="hl kwd">rainbow</span><span class="hl std">(</span><span class="hl num">100</span><span class="hl std">))</span>
135+
<span class="hl kwd">par3d</span><span class="hl std">(</span><span class="hl kwc">zoom</span> <span class="hl std">=</span> <span class="hl num">0.8</span><span class="hl std">)</span>
136136
</pre></div>
137137
</div><div class="rimage center"><img src="https://db.yihui.org/knitr-examples/figure/003-minimal-fancy-rgl-1.png" alt="plot of chunk fancy-rgl" class="plot" /></div></div>
138138

092-latex-rgl.Rnw

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
\usepackage{url}
33
\begin{document}
44

5-
A bug reported at \url{http://cos.name/cn/topic/110742}.
5+
A bug reported at \url{https://d.cosx.org/d/110742}.
66

77
<<rgl-demo>>=
88
library(knitr)
@@ -15,8 +15,8 @@ Then we only have to set the chunk option \texttt{rgl=TRUE}:
1515

1616
<<fancy-rgl, rgl=TRUE, dev='png', out.width='3in', fig.align='center', fig.show='hold', warning=FALSE>>=
1717
library(rgl)
18-
demo('bivar', package='rgl', echo=FALSE)
19-
par3d(zoom=.7)
18+
plot3d(data.frame(x = rnorm(100), y = rnorm(100), z = rnorm(100)), col = rainbow(100))
19+
par3d(zoom=.8)
2020
@
2121

2222
\end{document}

092-latex-rgl.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
5454
\begin{document}
5555

56-
A bug reported at \url{http://cos.name/cn/topic/110742}.
56+
A bug reported at \url{https://d.cosx.org/d/110742}.
5757

5858
\begin{knitrout}
5959
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
@@ -81,8 +81,8 @@
8181
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
8282
\begin{alltt}
8383
\hlkwd{library}\hlstd{(rgl)}
84-
\hlkwd{demo}\hlstd{(}\hlstr{"bivar"}\hlstd{,} \hlkwc{package} \hlstd{=} \hlstr{"rgl"}\hlstd{,} \hlkwc{echo} \hlstd{=} \hlnum{FALSE}\hlstd{)}
85-
\hlkwd{par3d}\hlstd{(}\hlkwc{zoom} \hlstd{=} \hlnum{0.7}\hlstd{)}
84+
\hlkwd{plot3d}\hlstd{(}\hlkwd{data.frame}\hlstd{(}\hlkwc{x} \hlstd{=} \hlkwd{rnorm}\hlstd{(}\hlnum{100}\hlstd{),} \hlkwc{y} \hlstd{=} \hlkwd{rnorm}\hlstd{(}\hlnum{100}\hlstd{),} \hlkwc{z} \hlstd{=} \hlkwd{rnorm}\hlstd{(}\hlnum{100}\hlstd{)),} \hlkwc{col} \hlstd{=} \hlkwd{rainbow}\hlstd{(}\hlnum{100}\hlstd{))}
85+
\hlkwd{par3d}\hlstd{(}\hlkwc{zoom} \hlstd{=} \hlnum{0.8}\hlstd{)}
8686
\end{alltt}
8787
\end{kframe}
8888

0 commit comments

Comments
 (0)