When I used the bookdown package, figure(using ggplot2) was correctly presented in local. But in Github page, the figure was broken.
This is my codes..
{r BT-comparision, fig.cap="Comparison of body temperature response by snake (poikiloterm) and bobcat (homeoterm) to changing ambient temperature.", out.width = "70%", tidy=FALSE, echo=FALSE, message=FALSE, warning=FALSE, fig.align='center'}
library(ggplot2)
tibble::tribble(
~"animal", ~"ambient", ~"body",
"Snake", 3, 2.8,
"Snake", 10, 10.1,
"Snake", 20, 19.8,
"Snake", 30, 30.8,
"Snake", 35, 36.0,
"Snake", 40, 39.0,
"Bobcat", 3, 36.3,
"Bobcat", 10, 36.5,
"Bobcat", 20, 36.6,
"Bobcat", 30, 37.0,
"Bobcat", 35, 37.5,
"Bobcat", 40, 37.5
) %>%
ggplot(aes(ambient, body, color = animal)) +
geom_point(size = 2) +
geom_line() +
xlab("Ambient temperature, °C") +
ylab("Body temperature, °C")
It correctly works in local (Rstudio and Chrome) & PDF but not in Github page
Github rep: https://github.com/YoungjunNa/animal-environmental-science
Book (see Fig 3.3): https://youngjunna.github.io/animal-environmental-science/temperature.html#poikilotherm-and-homeotherm
Thank you!