Title: | An Interface to the 'DescribeDisplay' 'GGobi' Plugin |
---|---|
Description: | Produce publication quality graphics from output of 'GGobi' describe display plugin. |
Authors: | Dianne Cook [aut, cre], Hadley Wickham [aut], Andreas Buja [aut], Barret Schloerke [aut] |
Maintainer: | Dianne Cook <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.11 |
Built: | 2024-11-17 03:24:39 UTC |
Source: | https://github.com/ggobi/describedisplay |
Add brush to plot This adds a rectangle to a ggplot plot indicating the brush position.
addbrush( plot, x, y, width = 0.5, height = 0.5, just = c("left", "top"), fill = "transparent", col = "black" )
addbrush( plot, x, y, width = 0.5, height = 0.5, just = c("left", "top"), fill = "transparent", col = "black" )
plot |
plot object |
x |
x position of brush |
y |
y position of brush |
width |
width of brush |
height |
height of brush |
just |
which corner of brush should be determined by x and y position |
fill |
fill colour for brush. Use ggplot-alpha for alpha blending. |
col |
outline colour of brush |
Hadley Wickham [email protected]
Also performs some conversion of data structures to more conveient form so that other functions do not have to repeatedly recompute. Some of these conversions could probably be moved into the Describe Display plugin, but it may be easier to just do them on the R side..
dd_load(path)
dd_load(path)
path |
file path |
object of class dd
Hadley Wickham [email protected]
dd_example
for an easier way of loading example
files
Produce publication quality graphics from output of GGobi's describe display plugin
http://ggobi.org https://ggplot2.tidyverse.org
Create a nice plot for Bar Plots Create a nice looking plot complete with axes using ggplot.
## S3 method for class 'barplot' ggplot(data, ..., spine = FALSE)
## S3 method for class 'barplot' ggplot(data, ..., spine = FALSE)
data |
plot to display, object created by |
... |
arguments passed through to the ggplot function |
spine |
(not implemented currently) whether to display the barchart as a spine plot |
Barret Schloerke [email protected]
library(ggplot2) print(ggplot(dd_example("barchart")))
library(ggplot2) print(ggplot(dd_example("barchart")))
Create a nice plot Create a nice looking plot complete with axes using ggplot.
## S3 method for class 'dd' ggplot(data, ...)
## S3 method for class 'dd' ggplot(data, ...)
data |
plot to display, object created by |
... |
not used |
Hadley Wickham [email protected]
library(ggplot2) print(example(ggplot.ddplot)) print(example(ggplot.histogram)) print(example(ggplot.barplot))
library(ggplot2) print(example(ggplot.ddplot)) print(example(ggplot.histogram)) print(example(ggplot.barplot))
Create a nice plot Create a nice looking plot complete with axes using ggplot.
## S3 method for class 'ddplot' ggplot(data, ..., axis.location = c(0.2, 0.2))
## S3 method for class 'ddplot' ggplot(data, ..., axis.location = c(0.2, 0.2))
data |
plot to display, object created by |
... |
arguments passed to the grob function |
axis.location |
grob function to use for drawing |
Hadley Wickham [email protected]
library(ggplot2) print(ggplot(dd_example("xyplot"))) print(ggplot(dd_example("tour2d"))) print(ggplot(dd_example("tour1d"))) print(ggplot(dd_example("plot1d"))) print( ggplot(dd_example("plot1d")) + geom_segment(aes(x = x, xend = x, y = 0, yend = y), size = 0.3) )
library(ggplot2) print(ggplot(dd_example("xyplot"))) print(ggplot(dd_example("tour2d"))) print(ggplot(dd_example("tour1d"))) print(ggplot(dd_example("plot1d"))) print( ggplot(dd_example("plot1d")) + geom_segment(aes(x = x, xend = x, y = 0, yend = y), size = 0.3) )
Create a nice plot for Histograms Create a nice looking plot complete with axes using ggplot.
## S3 method for class 'histogram' ggplot(data, ..., spine = FALSE)
## S3 method for class 'histogram' ggplot(data, ..., spine = FALSE)
data |
plot to display, object created by |
... |
arguments passed through to the ggplot function |
spine |
(not implemented currently) whether to display the barchart as a spine plot |
Barret Schloerke [email protected]
library(ggplot2) print(ggplot(dd_example("barchart"))) print(ggplot(dd_example("histogram")))
library(ggplot2) print(ggplot(dd_example("barchart"))) print(ggplot(dd_example("histogram")))
Create a nice plot for parallel coordinates plot Create a nice looking plot complete with axes using ggplot.
## S3 method for class 'parcoords' ggplot(data, ..., absoluteX = FALSE, absoluteY = FALSE, edges = TRUE)
## S3 method for class 'parcoords' ggplot(data, ..., absoluteX = FALSE, absoluteY = FALSE, edges = TRUE)
data |
plot to display |
... |
arguments passed to the grob function |
absoluteX |
make the sections proportional horizontally to eachother |
absoluteY |
make the sections proportional vertically to eachother |
edges |
boolean value to print edges. Defaults to TRUE. |
Barret Schloerke [email protected]
library(ggplot2) print(ggplot(dd_example("parcoord")))
library(ggplot2) print(ggplot(dd_example("parcoord")))
Create a nice plots in a scatter plot matrix Create a nice looking plots in a matrix. The 1d sections along the diagonal have a smooth density while the values are compared to eachother within the matrix.
## S3 method for class 'scatmat' ggplot(data, ...)
## S3 method for class 'scatmat' ggplot(data, ...)
data |
data to display |
... |
(currently) unused arguments |
Barret Schloerke [email protected]
library(ggplot2) print(ggplot(dd_example("scatmat")))
library(ggplot2) print(ggplot(dd_example("scatmat")))
Create nice plots for a time series Create nice looking plots complete with axes using ggplot. Produces graphics with a uniform x axis.
## S3 method for class 'timeseries' ggplot(data, ..., edges = FALSE)
## S3 method for class 'timeseries' ggplot(data, ..., edges = FALSE)
data |
to display |
... |
(currently) unused arguments |
edges |
Boolean operator to tell whether to try to force the edges or not. Will not work to remove the edges. |
Barret Schloerke [email protected]
library(ggplot2) print(ggplot(dd_example("timeseries"))) print(ggplot(dd_example("timeseries"), edges = TRUE))
library(ggplot2) print(ggplot(dd_example("timeseries"))) print(ggplot(dd_example("timeseries"), edges = TRUE))
This is mainly used for bug testing so that you can pull out a single panel quickly and easily.
## S3 method for class 'ddplot' plot( x, y = NULL, ..., axislocation = c(0.1, 0.1), axis.gp = gpar(col = "black"), background.color = "grey90" )
## S3 method for class 'ddplot' plot( x, y = NULL, ..., axislocation = c(0.1, 0.1), axis.gp = gpar(col = "black"), background.color = "grey90" )
x |
object to plot |
y |
NULL to satisfy generic functions and methods rules |
... |
(not used) |
axislocation |
location of axes (as x and y position in npc coordinates, ie. between 0 and 1) |
axis.gp |
frame grob containing all panels, note that this does not contain the title or border |
background.color |
color of in the background of the plot |
Hadley Wickham [email protected]
scatmat <- dd_example("scatmat") plot(scatmat) plot(scatmat$plots[[1]]) plot(scatmat$plots[[3]]) plot(scatmat$plots[[4]])
scatmat <- dd_example("scatmat") plot(scatmat) plot(scatmat$plots[[1]]) plot(scatmat$plots[[3]]) plot(scatmat$plots[[4]])
Run All Examples Will run all examples within the package
zeeThemAll()
zeeThemAll()
Barret Schloerke [email protected]