Description Usage Arguments Details Value Note Author(s) References See Also Examples
This function is a wrapper to sendplot that will create a single interactive scatterplot
1 2 3 4 5 6 7 8 9 10 11 12 |
plot.call |
character vector containing single plot call |
x.pos |
vector of x locations for interactive points |
y.pos |
vector of y locations for interactive points |
plot.extras |
List of additional plotting calls that should be executed for the plot. |
mai.mat |
1 x 4 matrix of values to be passed in for each plots par mai. n is equal to the length of plot.calls. If NA, uses default margins. |
mai.prc |
logical indicating if mai mat values are percentages or hard coded values. If mai.proc is T, indicates percentage. |
xy.labels |
list of matricies. All matricies should be of n x m where n is the length of xpos or ypos. This information is displayed in the interactive plot window |
image.size |
character indicating size of device. |
spot.radius |
radius of circle in pixels indicating area that will be interactive around the center of graphed points |
fname.root |
Base name to use for all files created. |
dir |
directory path to where files should be created. Default creates files in working directory |
window.size |
size of the html window |
... |
additional arguments to the makeImap function |
This function is a wrapper for the sendplot function to create a
single interacive scatterplot. See initSplot
, makeImap
, and
makeSplot
for more information.
Users are encouraged to read the package vignette which includes a detailed discussion of all function arguments as well as several useful examples.
Creates a static and interactive scatterplot
The interactive html plot currently only works in web browsers that implement java script.
The code used to create the javascript embedded in html file is a modified version of the javascript code or from the open source tooltip library. see reference links
Lori A. Shepherd, Daniel P. Gaile
http://www.onlamp.com/pub/a/onlamp/2007/07/05/writing-advanced-javascript.html
http://www.walterzorn.com/tooltip/tooltip\_e.htm
initSplot
, makeImap
,
makeSplot
, imagesend
,
heatmap.send
, sendplot-package
,
sendxy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | library(sendplot)
library(rtiff)
plot.call=c("plot(mtcars$hp,mtcars$mpg,xlab='gross horsepower',
ylab='miles per gallon',axes=FALSE,pch=mtcars$cyl,
col=mtcars$am+1,cex=0.875,
main='Motor Trend Car Road Tests')")
plot.extras=c("axis(1);axis(2);
legend(200,25,pch=rep(c(4,6,8),2),col=c(rep(1,3),rep(2,3)),
legend=paste(rep(c(4,6,8),2),'cylinders,',
c('automatic','manual')[c(rep(1,3),rep(2,3))]),cex=0.875)")
#set up temporary directory
direct = paste(tempdir(),"/",sep="")
direct
xy.send(plot.call=plot.call,
y.pos=mtcars$mpg,x.pos=mtcars$hp,
xy.labels = data.frame(name=rownames(mtcars),mtcars=mtcars),
plot.extras=plot.extras,
image.size="800x600",
fname.root="exPlotXY", dir = direct, font.size=18)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.