Skip to content

Commit 4d0cb72

Browse files
committed
30 not 31
1 parent 35e019b commit 4d0cb72

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

02_develop_visualization.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ If we use `geom_tile` instead, which will plot rectangles specified by a center
124124
),
125125
aes(x="DATE_YMD", y="centered_rank_across_industry", fill="PDIFF"),
126126
)
127-
+ geom_tile(height=0.95, width = 31*0.95) # <1>
127+
+ geom_tile(height=0.95, width=30 * 0.95) # <1>
128128
+ theme_tufte()
129129
+ theme(figure_size=FIGURE_THEME_SIZE, axis_text_x=element_text(angle=90))
130130
+ scale_fill_gradient2(
@@ -133,7 +133,7 @@ If we use `geom_tile` instead, which will plot rectangles specified by a center
133133
)
134134
```
135135

136-
1. I added `height = 0.95` to add some whitespace between tiles vertically. To remove horizontal whitespace, we need to specify a `width`. Because we are using a `datetime` axis, we need to specify it in unit of days. But each tile here is a month, so we need to express in units of 30 hence: `width = 31*0.95`.
136+
1. I added `height = 0.95` to add some whitespace between tiles vertically. To remove horizontal whitespace, we need to specify a `width`. Because we are using a `datetime` axis, we need to specify it in unit of days. But each tile here is a month, so we need to express in units of 30 hence: `width = 30*0.95`.
137137

138138
## Explicit color mapping with `scale_color_manual`
139139

0 commit comments

Comments
 (0)