Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make Treemap Bar Charts with 'ggplot2'

License

NotificationsYou must be signed in to change notification settings

hrryt/ggtreebar

Repository files navigation

The goal of ggtreebar is to provideggplot2 geoms analogous togeom_col() andgeom_bar() that allow for treemaps usingtreemapifynested within each bar segment.

Installation

You can install ggtreebar with the following command:

install.packages("ggtreebar")

You can install the development version of ggtreebar like so:

# install.packages("pak")pak::pak("hrryt/ggtreebar")

Example

This is a basic example which shows you how to solve a common problem:

library(ggplot2)library(ggtreebar)ggplot(diamonds, aes(clarity,fill=cut,subgroup=color))+  geom_treebar()

ggplot(diamonds, aes(clarity,fill=cut,subgroup=cut,subgroup2=color))+  geom_treebar()+  geom_treebar_subgroup_border()+  geom_treebar_subgroup2_text()

ggplot(diamonds, aes(y=cut,fill=color,subgroup=clarity))+  geom_treebar(position="dodge")

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp