Skip to content

r scripting charts box

Sebastian Seitner edited this page Jan 4, 2018 · 3 revisions

Box Chart

To use a box chart you have to import the according classes via:

import(at.gmi.djamei.viz.charts.gral.BoxChart)

Parameters

A box chart has the following parameter options

Name Type
data A vector of data values
groups A Factor listing the groupname association of the rows in the data vector
colors A character vector containing the color values to be used for the different groups
xLabel The label for the X axis
yLabel The label for the Y axis
title The title of the plot

Example

data<- c(1,5.3,21,3.3,9,12.2,1.5,6,9,10)
groups <-c("Group1","Group1","Group1","Group1","Group1","Group2","Group2","Group2","Group2","Group2")
box <- BoxChart$new(
    data = data,
    groups=as.factor(groups),
    colors = colors,
    xLabel = "Treatments",
    yLabel = "Value",
    title = "Box Chart"
)
phenopipe_add_chart(box)

Box Chart Example

Clone this wiki locally