Permalink
Browse files

add a figure to the help for points

git-svn-id: https://svn.r-project.org/R/trunk@56325 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information...
1 parent 286e03a commit 275f58c0c99cfdc0cc8adcd1bd16043b0bac535b ripley committed Jul 8, 2011
View
@@ -212,7 +212,8 @@
\item Added new \samp{\figure} tag to Rd markup, so
that figures can be included in help pages when displayed
- in HTML or LaTeX.
+ in HTML or LaTeX. There is an example in the help page for
+ \code{points()}.
\item The built-in httpd server now allows access to files
in the session temporary directory \code{tempdir()},
View
@@ -1,3 +1,4 @@
+\usepackage{graphicx}
\usepackage{makeidx}
\pagestyle{headings}
View
@@ -163,6 +163,13 @@ mksrc-win2:
(cd src && $(MAKE) -f Makefile.win) || exit 1; \
fi
+
+mkfigs:
+ @if test -d $(srcdir)/man/figures; then \
+ mkdir -p $(top_builddir)/library/$(pkg)/help/figures; \
+ cp $(srcdir)/man/figures/* $(top_builddir)/library/$(pkg)/help/figures; \
+ fi
+
install-tests:
@if test -d tests; then \
mkdir -p $(top_builddir)/library/$(pkg)/tests; \
@@ -23,7 +23,7 @@ DEFPKGS = NULL
all: Makefile DESCRIPTION
@$(ECHO) "building package '$(pkg)'"
@$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)
- @$(MAKE) mkR1 mkdesc mkdemos mkpo
+ @$(MAKE) mkR1 mkdesc mkdemos mkpo mkfigs
@$(MAKE) mklazycomp
@@ -17,7 +17,7 @@ DEFPKGS = NULL
all:
@$(ECHO) "building package '$(pkg)'"
@$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)
- @$(MAKE) -f Makefile.win mkR1 mkdesc mkdemos mkpo
+ @$(MAKE) -f Makefile.win mkR1 mkdesc mkdemos mkpo mkfigs
@$(MAKE) -f Makefile.win mklazycomp
include $(top_srcdir)/share/make/basepkg.mk
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,6 +1,6 @@
% File src/library/graphics/man/points.Rd
% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Development Team
+% Copyright 1995-2011 R Core Development Team
% Distributed under GPL 2 or later
\name{points}
@@ -86,11 +86,16 @@ points(x, \dots)
Note that unlike S (which uses octagons), symbols \code{1}, \code{10},
\code{13} and \code{16} use circles. The filled shapes \code{15:18}
do not include a border.
+
+ \if{text}{\figure{}{Illustration of pch 0:25}}
+% \if{html}{\figure{pch.svg}{Illustration of pch 0:25}}
+ \if{html}{\figure{pch.png}{Illustration of pch 0:25}}
+ \if{latex}{\figure{pch.pdf}{options: width=15cm}}
The following \R plotting symbols are can be obtained with
\code{pch=19:25}: those with \code{21:25} can be colored and
filled with different colors: \code{col} gives the border color
- and \code{bg} the background color.
+ and \code{bg} the background color (which is \samp{"grey"} in the figure):
\itemize{
\item \code{pch=19}: solid circle,
\item \code{pch=20}: bullet (smaller solid circle, 2/3 the size of 19),
@@ -166,6 +171,15 @@ plot(x, sin(x), type="o", pch=21, bg=par("bg"), col = "blue", cex=.6,
main='plot(..., type="o", pch=21, bg=par("bg"))')
par(op)
+\dontrun{
+## The figure was produced by calls like
+png("pch.png", height=0.7, width = 7, res = 100, units="in")
+par(mar = rep(0,4))
+plot(c(-1, 26), 0:1, type="n", axes= FALSE)
+text(0:25, 0.6, 0:25, cex = 0.5)
+points(0:25, rep(0.3, 26), pch = 0:25, bg = "grey")
+}
+
##-------- Showing all the extra & some char graphics symbols ---------
pchShow <-
function(extras = c("*",".", "o","O","0","+","-","|","\%","#"),

0 comments on commit 275f58c

Please sign in to comment.