Permalink
Browse files

Remove old web page code

  • Loading branch information...
wch committed May 23, 2012
1 parent 77b9ff4 commit b16975d92f0fea5cb0f46044b0f13b749b446741
Showing with 0 additions and 79 deletions.
  1. +0 −72 R/aaa-.r
  2. +0 −7 R/position-.r
View
@@ -44,78 +44,6 @@ TopLevel <- proto(expr = {
aesthetics <- c(.$required_aes, names(.$default_aes()))
param[setdiff(names(param), aesthetics)]
}
-
- html_aesthetics <- function(.) {
- if (!exists("default_aes", .)) return("")
-
- req <- rep("<strong>required</strong>", length(.$required_aes))
- names(req) <- .$required_aes
-
- aes <- c(req, .$default_aes())
- if (length(aes) == 0) return("")
-
- scale_links <- sapply(names(aes), .$html_scales)
- scale_links <- sapply(scale_links, ps)
-
- ps(
- "<h2>Aesthetics</h2>\n",
- html_auto_link(ps("<p>The following aesthetics can be used with ", .$my_name(), ". Aesthetics are mapped to variables in the data with the aes function: <code>", .$my_name(), "(aes(x = var))</code>. Note that you do not need quotes around the variable name.</p>\n",
- "<p>Scales control how the variable is mapped to the aesthetic and are listed after each aesthetic.</p>\n"), .$my_name()),
- "<table width='100%'>\n",
- "<tr><th>Aesthetic</th> <th>Default</th> <th>Related scales</th></tr>\n",
- ps(
- "<tr>\n",
- "<td>", names(aes), "</td><td>", aes, "</td><td>", scale_links, "</td>\n",
- "</tr>\n"
- ),
- "</table>\n",
- "<p>Layers are divided into groups by the <code>group</code> aesthetic. By default this is set to the interaction of all categorical variables present in the plot. </p>\n"
- )
- }
-
- html_feedback <- function(.) {
- ps("<p class='feedback'>What do you think of the documentation? <a href='http://hadley.wufoo.com/forms/documentation-feedback/def/field0=", .$my_name(), "'>Please let me know by filling out this short online survey</a>.</p>")
- }
-
-
-
- # Object icon -----------------------
- html_img_path <- function(.) {
- ps(.$my_name(), ".png")
- }
-
- html_img_link <- function(., align=NULL) {
- ps("<a href='", .$html_path(), "'>", .$html_img(align), "</a>")
- }
-
- html_img <- function(., align=NULL) {
- ps(
- "<img src='", .$html_img_path(), "'", if (!is.null(align)) {ps(" align='", align, "'")}, " width='50' height='50' alt='' class='icon' />\n"
- )
- }
-
- html_img_draw <- function(., path="web/") {
- png(ps(path, .$html_img_path()), width=50, height=50)
- grid.newpage()
- grid.draw(.$icon())
- dev.off()
- }
-
- # Examples -----------------------
- html_examples <- function(.) {
- if (!.$doc) return(FALSE)
- require("decumar", quiet = TRUE)
-
- curdir <- getwd()
- on.exit(setwd(curdir))
- setwd("~/Documents/ggplot/ggplot/web")
-
- html_auto_link(ps(
- "<h2>Examples</h2>\n",
- interweave_html(.$examples_text(), outdir = "graphics", dpi = 72),
- "\n"
- ), .$my_name())
- }
})
View
@@ -24,13 +24,6 @@ Position <- proto(TopLevel, expr = {
cat("position_", .$objname, ": (", clist(.$parameters()), ")", sep="")
if (newline) cat("\n")
}
-
- html_returns <- function(.) {
- ps(
- "<h2>Returns</h2>\n",
- "<p>This function returns a position object.</p>"
- )
- }
})

0 comments on commit b16975d

Please sign in to comment.