Skip to content

Commit

Permalink
Merge pull request #102 from JosephBARBIERDARNAL/caveat
Browse files Browse the repository at this point in the history
fix treemap labels
  • Loading branch information
holtzy authored Jun 28, 2024
2 parents 52e9f1b + e9d8780 commit 63a7918
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 43 deletions.
40 changes: 21 additions & 19 deletions story/SevCatOneNumNestedOneObsPerGroup.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -70,25 +70,27 @@ A [treemap](https://www.data-to-viz.com/graph/treemap.html) represents each node
```{r, fig.align="center", fig.width=8, fig.height=7, warning=FALSE}
library(treemap)
p <- treemap(data,
# data
index=c("Continent", "Region", "Country"),
vSize="Pop",
type="index",
title="",
palette="Dark2",
# Borders
border.col=c("black", "grey", "grey"),
border.lwds=c(1,0.5,0.1),
# Labels
fontcolor.labels=c("white", "white", "black"),
fontface.labels=1,
bg.labels=c("transparent"),
align.labels=list( c("center", "center"), c("left", "top"), c("right", "bottom")),
overlap.labels=0.5
p <- treemap(
data,
# data
index=c("Continent", "Region", "Country"),
vSize="Pop",
type="index",
title="",
palette="Dark2",
# Borders
border.col=c("black", "grey", "grey"),
border.lwds=c(1,0.5,0.1),
# Labels
fontcolor.labels=c("white", "white", "black"),
fontface.labels=1,
bg.labels=c("transparent"),
align.labels=list( c("center", "center"), c("left", "top"), c("right", "bottom")),
overlap.labels=0.5,
fontsize.labels=c(32, 20, 13)
)
```

Expand Down
50 changes: 26 additions & 24 deletions story/SevCatOneNumNestedOneObsPerGroup.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 63a7918

Please sign in to comment.