Description Usage Arguments Value Examples
Make an interactive Heatmap
1 2 3 4 |
data |
A data.frame |
xvar |
A character string of column name be assigned to the x-axis variable |
yvar |
A character string of column name be assigned to the y-axis variable. Uses only when stat="identity". |
fillvar |
A character string of column name be assigned to the fill variable |
stat |
The statistical transformation to use on the data for this layer, as a string c("count","identity") |
gradient_colors |
A voector of color names used in function scale_fill_gradientn(). Default value is c("white","steelblue") |
addlabel |
A logical value. If TRUE, label will be added to the plot |
polar |
A logical value. If TRUE, coord_polar() function will be added |
interactive |
A logical value. If TRUE, an interactive plot will be returned |
yangle |
A integer. The value will be used adjust the angle of axis.text.y |
color |
Color argument passed on to geom_bar_interactive. |
size |
Size argument passed on to geom_bar_interactive. |
... |
other arguments passed on to geom_bar_interactive. |
facet |
A character string of column name be assigned to the facet_wrap variable |
An interactive barplot
1 2 3 4 5 6 7 8 9 10 | require(moonBook)
require(ggplot2)
require(ggiraph)
ggHeatmap(acs,"Dx","smoking",addlabel=TRUE)
ggHeatmap(rose,"group","Month","value",stat="identity",gradient_colors = c("white","red"))
ggHeatmap(rose,"group","Month","value",stat="identity",addlabel=TRUE)
ggHeatmap(rose,"Month","group","value",stat="identity",polar=TRUE,interactive=TRUE)
ggHeatmap(taco,"AgeGroup","Filling","Rating",stat="identity")
ggHeatmap(taco,"AgeGroup","Filling","Rating","ShellType",stat="identity")
ggHeatmap(taco,"AgeGroup","Filling","Rating","ShellType",stat="identity",interactive=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.