Version: | 0.2.11 |
Title: | An Interface to the 'DescribeDisplay' 'GGobi' Plugin |
Description: | Produce publication quality graphics from output of 'GGobi' describe display plugin. |
License: | MIT + file LICENSE |
URL: | https://github.com/ggobi/DescribeDisplay |
BugReports: | https://github.com/ggobi/DescribeDisplay/issues |
Imports: | reshape2, ggplot2 (≥ 3.4.1), plyr, scales, grid, GGally (≥ 2.1.2) |
Suggests: | testthat |
RoxygenNote: | 7.2.3 |
Encoding: | UTF-8 |
NeedsCompilation: | no |
Packaged: | 2023-08-24 22:55:36 UTC; cookd |
Author: | Dianne Cook [aut, cre], Hadley Wickham [aut], Andreas Buja [aut], Barret Schloerke [aut] |
Maintainer: | Dianne Cook <dicook@monash.edu> |
Repository: | CRAN |
Date/Publication: | 2023-08-25 08:50:15 UTC |
R interface to DescribeDisplay (GGobi plugin).
Description
Produce publication quality graphics from output of GGobi's describe display plugin
References
http://ggobi.org https://ggplot2.tidyverse.org
Add brush to plot This adds a rectangle to a ggplot plot indicating the brush position.
Description
Add brush to plot This adds a rectangle to a ggplot plot indicating the brush position.
Usage
addbrush(
plot,
x,
y,
width = 0.5,
height = 0.5,
just = c("left", "top"),
fill = "transparent",
col = "black"
)
Arguments
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 |
Author(s)
Hadley Wickham h.wickham@gmail.com
Axes grob Construct grob for axes.
Description
Axes grob Construct grob for axes.
Usage
axesGrob(axes, gp = gpar(col = "black"))
Arguments
axes |
describe display object |
gp |
arguments to the axes |
Author(s)
Hadley Wickham h.wickham@gmail.com
Axes viewport Construct viewport for axes.
Description
Axes viewport Construct viewport for axes.
Usage
axesViewport(axes, axislocation)
Arguments
axes |
describe display object |
axislocation |
location of axes (as x and y position in npc coordinates, ie. between 0 and 1) |
Author(s)
Hadley Wickham h.wickham@gmail.com
Compact pcp data A parallel coordinates is written out as a series of 1D dotplots. This function compacts it back into one dataset.
Description
Compact pcp data A parallel coordinates is written out as a series of 1D dotplots. This function compacts it back into one dataset.
Usage
compact_pcp(data)
Arguments
data |
data to pull points from |
Author(s)
Hadley Wickham h.wickham@gmail.com
Compact scatmat data A scatter plot matrix is made from the information from the 1Dplots. This function collects only that data.
Description
Compact scatmat data A scatter plot matrix is made from the information from the 1Dplots. This function collects only that data.
Usage
compact_scatmat(data)
Arguments
data |
data to display |
Author(s)
Barret Schloerke schloerke@gmail.com
Compact time series data A time series plot is made from scatterplots with a common x axis. This function pulls the correct information out of the data.
Description
Compact time series data A time series plot is made from scatterplots with a common x axis. This function pulls the correct information out of the data.
Usage
compact_timeseries(data)
Arguments
data |
data to display |
Author(s)
Barret Schloerke schloerke@gmail.com
Clean plot data structure Cleans up plot data structure into consistent, easy to use data structure
Description
Clean plot data structure Cleans up plot data structure into consistent, easy to use data structure
Usage
dd_clean_plot(dd, n = 1)
Arguments
dd |
dd object |
n |
plot number |
Author(s)
Hadley Wickham h.wickham@gmail.com
Describe display plot defaults Gather overall plot defaults for specified plot
Description
Describe display plot defaults Gather overall plot defaults for specified plot
Usage
dd_defaults(dd, n = 1)
Arguments
dd |
list of values from describe display |
n |
plot number, defaults to first plot |
Author(s)
Hadley Wickham h.wickham@gmail.com
Describe display edge data Retrieves the describe display edge data for the given plot number.
Description
Describe display edge data Retrieves the describe display edge data for the given plot number.
Usage
dd_edges(dd, n = 1)
Arguments
dd |
list of values from describe display |
n |
plot number, defaults to first plot |
Value
data frame suitable for plotting
Author(s)
Hadley Wickham h.wickham@gmail.com
Load example describe display file Load example describe display file included with package.
Description
These are mainly used for testing.
Usage
dd_example(name)
Arguments
name |
name of example |
Author(s)
Hadley Wickham h.wickham@gmail.com
Examples
a <- dd_example("xyplot")
Load describe display Retrieve output of from describe display plugin
Description
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..
Usage
dd_load(path)
Arguments
path |
file path |
Value
object of class dd
Author(s)
Hadley Wickham h.wickham@gmail.com
See Also
dd_example
for an easier way of loading example
files
Describe display plot class Compute valid R class name for given plot type
Description
Describe display plot class Compute valid R class name for given plot type
Usage
dd_plot_class(projection)
Arguments
projection |
type of projection that should be used |
Author(s)
Hadley Wickham h.wickham@gmail.com
Describe display points data Retrieves the describe display points data for the given plot number.
Description
Describe display points data Retrieves the describe display points data for the given plot number.
Usage
dd_points(dd, n = 1)
Arguments
dd |
list of values from describe display |
n |
plot number, defaults to first plot |
Value
data frame suitable for plotting
Author(s)
Hadley Wickham h.wickham@gmail.com
Describe display tour axis Return representation of axes for specified plot
Description
Describe display tour axis Return representation of axes for specified plot
Usage
dd_tour_axes(plot)
Arguments
plot |
list of information of a plot |
Author(s)
Hadley Wickham h.wickham [at] gmail.com
Panel grob Construct grob for single panel.
Description
Panel grob Construct grob for single panel.
Usage
ddpanelGrob(
panel,
axislocation = c(0.1, 0.1),
axis.gp = gpar(col = "black"),
background.color = "grey90"
)
Arguments
panel |
describe display object |
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 |
axis |
location, x and y position |
Author(s)
Hadley Wickham h.wickham@gmail.com
Geom Axis.
Description
A special ggplot2 geom for drawing the tour axes
Usage
geom_axis(axis, location, ...)
Arguments
... |
should include data, location, |
Author(s)
Hadley Wickham h.wickham@gmail.com
Examples
library(ggplot2)
print(ggplot(dd_example("tour2d")))
Create a nice plot for Bar Plots Create a nice looking plot complete with axes using ggplot.
Description
Create a nice plot for Bar Plots Create a nice looking plot complete with axes using ggplot.
Usage
## S3 method for class 'barplot'
ggplot(data, ..., spine = FALSE)
Arguments
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 |
Author(s)
Barret Schloerke schloerke@gmail.com
Examples
library(ggplot2)
print(ggplot(dd_example("barchart")))
Create a nice plot Create a nice looking plot complete with axes using ggplot.
Description
Create a nice plot Create a nice looking plot complete with axes using ggplot.
Usage
## S3 method for class 'dd'
ggplot(data, ...)
Arguments
data |
plot to display, object created by |
... |
not used |
Author(s)
Hadley Wickham h.wickham@gmail.com
Examples
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.
Description
Create a nice plot Create a nice looking plot complete with axes using ggplot.
Usage
## S3 method for class 'ddplot'
ggplot(data, ..., axis.location = c(0.2, 0.2))
Arguments
data |
plot to display, object created by |
... |
arguments passed to the grob function |
axis.location |
grob function to use for drawing |
Author(s)
Hadley Wickham h.wickham@gmail.com
Examples
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.
Description
Create a nice plot for Histograms Create a nice looking plot complete with axes using ggplot.
Usage
## S3 method for class 'histogram'
ggplot(data, ..., spine = FALSE)
Arguments
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 |
Author(s)
Barret Schloerke schloerke@gmail.com
Examples
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.
Description
Create a nice plot for parallel coordinates plot Create a nice looking plot complete with axes using ggplot.
Usage
## S3 method for class 'parcoords'
ggplot(data, ..., absoluteX = FALSE, absoluteY = FALSE, edges = TRUE)
Arguments
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. |
Author(s)
Barret Schloerke schloerke@gmail.com
Examples
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.
Description
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.
Usage
## S3 method for class 'scatmat'
ggplot(data, ...)
Arguments
data |
data to display |
... |
(currently) unused arguments |
Author(s)
Barret Schloerke schloerke@gmail.com
Examples
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.
Description
Create nice plots for a time series Create nice looking plots complete with axes using ggplot. Produces graphics with a uniform x axis.
Usage
## S3 method for class 'timeseries'
ggplot(data, ..., edges = FALSE)
Arguments
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. |
Author(s)
Barret Schloerke schloerke@gmail.com
Examples
library(ggplot2)
print(ggplot(dd_example("timeseries")))
print(ggplot(dd_example("timeseries"), edges = TRUE))
Draw dd plot Draw a complete describe display.
Description
If you want to layout multiple dd plots on the same page, you can
use grid.layout
. If you need even more control,
set draw = FALSE
and then grid.draw
the
resulting grob yourself.
Usage
## S3 method for class 'dd'
plot(
x,
y = NULL,
...,
draw = TRUE,
axislocation = c(0.1, 0.1),
size = 0.9,
axisgp = gpar(col = "black"),
background.color = "grey90"
)
Arguments
x |
dd object to plot |
y |
NULL to satisfy generic functions and methods rules |
... |
(unused) |
draw |
draw plot, or just return grob |
axislocation |
location of axes (as x and y position in npc coordinates, ie. between 0 and 1) |
size |
size of plot as a proportion of the total display area (set to 1 for printed out) |
axisgp |
color of the axis |
background.color |
color of in the background of the plot |
Details
This function reads a number of options directly out of the descripedisplay datastructure. See the examples for ways to use these.
Value
frame grob containing all panels, note that this does not contain the title or border
Author(s)
Hadley Wickham h.wickham@gmail.com
Examples
plot(dd_example("xyplot"))
plot(dd_example("tour1d"))
plot(dd_example("tour2d"))
Plot a dd plot Convenient method to draw a single panel.
Description
This is mainly used for bug testing so that you can pull out a single panel quickly and easily.
Usage
## S3 method for class 'ddplot'
plot(
x,
y = NULL,
...,
axislocation = c(0.1, 0.1),
axis.gp = gpar(col = "black"),
background.color = "grey90"
)
Arguments
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 |
Author(s)
Hadley Wickham h.wickham@gmail.com
Examples
scatmat <- dd_example("scatmat")
plot(scatmat)
plot(scatmat$plots[[1]])
plot(scatmat$plots[[3]])
plot(scatmat$plots[[4]])
Scale the values by range Divide the values of the objects by the range of values
Description
Scale the values by range Divide the values of the objects by the range of values
Usage
range01(x)
Arguments
x |
values to be worked on |
Author(s)
Hadley Wickham h.wickham@gmail.com
Remove hidden points Will remove all hidden points from the plot.
Description
Remove hidden points Will remove all hidden points from the plot.
Usage
removehiddens(d)
Arguments
ddplot object |
Author(s)
Hadley Wickham h.wickham@gmail.com
Run All Examples Will run all examples within the package
Description
Run All Examples Will run all examples within the package
Usage
zeeThemAll()
Author(s)
Barret Schloerke schloerke@gmail.com