Learn R Programming

ggiraphExtra (version 0.1.0)

ggHeatmap: Make an interactive Heatmap

Description

Make an interactive Heatmap

Usage

ggHeatmap(data, mapping, stat = "count", gradient_colors = c("white",
  "steelblue"), addlabel = FALSE, polar = FALSE, interactive = FALSE,
  yangle = 0, color = "black", size = 0.1, ...)

Arguments

data

A data.frame

mapping

Set of aesthetic mappings created by aes or aes_.

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.

Value

An interactive barplot

Examples

Run this code
# NOT RUN {
require(moonBook)
require(ggplot2)
require(ggiraph)
ggHeatmap(acs,aes(x=Dx,y=smoking),addlabel=TRUE)
ggHeatmap(rose,aes(x=Month,y=group,fill=value),stat="identity",gradient_colors = c("white","red"))
ggHeatmap(taco,aes(x=AgeGroup,y=Filling,fill=Rating,facet=ShellType),stat="identity")
# }

Run the code above in your browser using DataLab