Resize a plot generated in R in a web page generated by blogdown to different screen size

99封情书 提交于 2020-01-06 05:15:55

问题


  • Antecedent 1: A static hugo page generated by the blogdown R package.

  • Antecedent 2: A blog post created from a rmarkdown document with R plots.

  • Question: Some way to resize a plot produced by a chunk of R code in a rmarkdown post when I open the page from a mobile phone?

For example, all the content of this post is resize when I open from my mobile except the plot. How can achieve something like that?

Thank in advance!


回答1:


The easiest way to resize images according to the available screen width is to set this CSS rule:

img {
  max-width: 100%;
}


来源:https://stackoverflow.com/questions/45827291/resize-a-plot-generated-in-r-in-a-web-page-generated-by-blogdown-to-different-sc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!