plotFriedEggs | R Documentation |
Create a pairs plot where the lower left half comprises either fried egg contours or smoke ring contours, the upper right half comprises glasses of beer filled to the correlation point, and the diagonals show frequency histograms of the input data.
plotFriedEggs(A, eggs=TRUE, rings=TRUE, levs=c(0.01,0.1,0.5,0.75,0.95),
pepper=200, replace=FALSE, jitt=c(1,1), bw=25, histclr=NULL)
A |
data frame or matrix for use in a pairs plot. |
eggs |
logical: if |
rings |
logical: if |
levs |
explicit contour levels expressed as quantiles. |
pepper |
number of samples to draw from |
replace |
logical: if |
jitt |
argument |
bw |
argument |
histclr |
user-specified colour(s) for histogram bars along the diagonal. |
This function comes to us from Dr. Steve Martell of the Fisheries Science Centre at UBC. Obviously many hours of contemplation with his students at the local pub have contributed to this unique rendition of a pairs plot.
If eggs=TRUE
and rings=FALSE
, fried eggs are served.
If eggs=FALSE
and rings=TRUE
, smoke rings are blown.
If eggs=TRUE
and rings=TRUE
, only fried eggs are served.
If eggs=FALSE
and rings=FALSE
, only pepper is sprinkled.
Steve Martell, International Pacific Halibut Commission, Seattle WA
plotBubbles
, scalePar
KernSmooth::bkde2D
, grDevices::contourLines
, graphics::contour
local(envir=.PBSmodEnv,expr={
oldpar = par(no.readonly=TRUE)
x=rnorm(5000,10,3); y=-x+rnorm(5000,1,4); z=x+rnorm(5000,1,3)
A=data.frame(x=x,y=y,z=z)
for (i in 1:3)
switch(i,
{plotFriedEggs(A,eggs=TRUE,rings=FALSE);
pause("Here are the eggs...(Press Enter for next)")},
{plotFriedEggs(A,eggs=FALSE,rings=TRUE);
pause("Here are the rings...(Press Enter for next)")},
{plotFriedEggs(A,eggs=FALSE,rings=FALSE);
cat("Here is the pepper alone.\n")} )
par(oldpar)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.