Skip to content

Commit 9084188

Browse files
authored
Update 08_Intro_plot_assembly.md
1 parent 6b2f1cc commit 9084188

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Lessons/08_Intro_plot_assembly.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,11 @@ A2
167167
A3
168168
```
169169

170-
![A1](https://github.com/cxli233/Online_R_learning/blob/master/Quick_data_vis/Results/08_A1.png)
170+
![A1](https://github.com/cxli233/Quick_data_vis/blob/main/Results/08_A1.png)
171171

172-
![A2](https://github.com/cxli233/Online_R_learning/blob/master/Quick_data_vis/Results/08_A2.png)
172+
![A2](https://github.com/cxli233/Quick_data_vis/blob/main/Results/08_A_2.png)
173173

174-
![A3](https://github.com/cxli233/Online_R_learning/blob/master/Quick_data_vis/Results/08_A3.png)
174+
![A3](https://github.com/cxli233/Quick_data_vis/blob/main/Results/08_A3.png)
175175

176176
### The design of the composite
177177
To create a composite, we use the `wrap_plots()` function from `patchwork`.
@@ -202,7 +202,7 @@ wrap_plots(A1, A2, A3,
202202
ggsave("../Results/08_A_1.png", height = 6, width = 6)
203203
```
204204

205-
![A_1](https://github.com/cxli233/Online_R_learning/blob/master/Quick_data_vis/Results/08_A_1.png)
205+
![A_1](https://github.com/cxli233/Quick_data_vis/blob/main/Results/08_A_1.png)
206206

207207
The way `wrap_plots()` matches sub-panel names to parts A, B, and C is by the order.
208208
In this case, the first sub-panel name (A1) provided is part A, and so on.
@@ -224,7 +224,7 @@ wrap_plots(A1, A2, A3,
224224
ggsave("../Results/08_A_2.png", height = 6, width = 6)
225225
```
226226

227-
![A_2](https://github.com/cxli233/Online_R_learning/blob/master/Quick_data_vis/Results/08_A_2.png)
227+
![A_2](https://github.com/cxli233/Quick_data_vis/blob/main/Results/08_A_2.png)
228228

229229
For example, vector `c(0.3, 1)` passed on to the `widths` option specifies that the 1st column should be 0.3 of the width of the 2nd column.
230230
Notice we only 2 rows and columns, so the heights and widths vectors each have 2 numbers.
@@ -252,7 +252,7 @@ Panel_A
252252
ggsave("../Results/08_A.png", height = 6, width = 6)
253253
```
254254

255-
![A](https://github.com/cxli233/Online_R_learning/blob/master/Quick_data_vis/Results/08_A.png)
255+
![A](https://github.com/cxli233/Quick_data_vis/blob/main/Results/08_A.png)
256256

257257
Now we have panel A!
258258

@@ -267,9 +267,9 @@ Panel_B
267267
Panel_C
268268
```
269269

270-
![B](https://github.com/cxli233/Online_R_learning/blob/master/Quick_data_vis/Results/08_B.png)
270+
![B](https://github.com/cxli233/Quick_data_vis/blob/main/Results/08_B.png)
271271

272-
![C](https://github.com/cxli233/Online_R_learning/blob/master/Quick_data_vis/Results/08_C.png)
272+
![C](https://github.com/cxli233/Quick_data_vis/blob/main/Results/08_C.png)
273273

274274
Let's say we want panel A and panel B to be in the left column, panel C alone take up the entire right column, what should the design argument be?
275275
```{r}
@@ -295,7 +295,7 @@ Again, we can control that by calling `widths = ` and `heights = ` within `wrap_
295295
ggsave("../Results/08_assembled.png", height = 7, width = 8)
296296
```
297297

298-
![assembled](https://github.com/cxli233/Online_R_learning/blob/master/Quick_data_vis/Results/08_assembled.png)
298+
![assembled](https://github.com/cxli233/Quick_data_vis/blob/main/Results/08_assembled.png)
299299

300300
Now we are really close.
301301
Notice that only panel A is labeled?
@@ -317,7 +317,7 @@ We just need to append `+ labs(tag = "B")` and `+ labs(tag = "C")` to the respec
317317
ggsave("../Results/08_assembled_label.png", height = 7, width = 8)
318318
```
319319

320-
![assembled_labeled](https://github.com/cxli233/Online_R_learning/blob/master/Quick_data_vis/Results/08_assembled_label.png)
320+
![assembled_labeled](https://github.com/cxli233/Quick_data_vis/blob/main/Results/08_assembled_label.png)
321321

322322
Done!
323323
Great, we have a publication ready figure!

0 commit comments

Comments
 (0)