ggInterval_scatter {ggESDA}R Documentation

scatter plot for two continuous interval data

Description

Visualize the twwo continuous variable distribution by rectangle and each of its width and heigth represents a interval of the data.

Usage

ggInterval_scatter(data = NULL,mapping = aes(NULL), ...)

Arguments

data

A ggESDA object.It can also be either RSDA object or classical data frame, which will be automatically convert to ggESDA data.

mapping

Set of aesthetic mappings created by aes() or aes_(). If specified and inherit. aes = TRUE (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if there is no plot mapping.

...

Others in ggplot2.

Value

Return a ggplot2 object.

Examples

a<-rnorm(1000,0,5)
b<-runif(1000,-20,-10)
d<-as.data.frame(cbind(norm=a,unif=b))
ggInterval_scatter(d,aes(a,b))


ggInterval_scatter(mtcars[,c("mpg","wt","qsec")],
    aes(x=mpg,y=wt,
    col="red",lty=2,fill="blue",alpha=0.3))


myIris <- classic2sym(iris,groupby = "Species")$intervalData
p<-ggInterval_scatter(myIris,aes(myIris$Petal.Length,myIris$Petal.Width))
p
p+scale_fill_manual(labels=rownames(myIris),
                   values=c("red","blue","green"),
                   name="Group")


mydata <- ggESDA::facedata
p<-ggInterval_scatter(mydata[1:10,],aes(AD,BC,alpha=0.2))
p+scale_fill_manual(labels=rownames(mydata)[1:10],
                   values=rainbow(10),
                   name="Group")

[Package ggESDA version 0.2.0 Index]