ch.addLegend | R Documentation |
This function adds a legend to a plot.
ch.addLegend(
df.legend,
grpCols,
placement = "topright",
horiz = T,
lwd = 1,
cexLegend = 0.5,
bty = "n",
includeTitle = T,
inset = c(-0.3, 0),
...
)
df.legend |
a legend dataframe created by ch.getPlotLegendVals(). |
grpCols |
a vector of strings that specifies the names of the column in "df.legend" that contain the grouping variables that are plotted. |
placement |
the placement of the legend: "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center". DEFAULT = "topright" |
horiz |
a boolean to draw the legend horizontal (vs vertical). DEFAULT = T. |
lwd |
see par for more info. DEFAULT = 1. |
bty |
see par for more info. DEFAULT = "n" |
includeTitle |
a boolean to add a title to the legend. DEFAULT = T. |
cex |
see par for more info. DEFAULT = .5. |
.
ch.addLegend(df.legend, c("cond1", "cond2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.