为什么rmarkDown中的图像在滚动视图中且未正确显示?

发布于 2025-01-31 08:11:00 字数 700 浏览 2 评论 0原文

我正在尝试在我的rmarkDown文件中使用以下内容,并且输出HTML在滚动视图中显示图像,并且也无法正确显示。

---
title: "XXX"
author: "me"
date: "date"
output:
  html_document: default
keep_md: true
---

    ```{r setup, include=FALSE}
    knitr::opts_chunk$set(echo = TRUE,
                          fig.path = "Plots/",
                          dev = c("png", "pdf"),
                          fig.width = 10,
                          fig.height = 7,
                          dpi = 300)
    ```

Some text

Code 

Code

Code

```{r myplot, dev="pdf", fig.width=7, fig.height=7}
ggplot......
```

因此,在上面的情况下,在文件夹图中我有myplot.pdf,但是在html文件中显示如下:

​滚动以查看整个图像,不要得到那些黑色的东西。

I'm trying to use the following in my RMarkdown file, and the output HTML shows the images in a scroll view and also doesn't display properly.

---
title: "XXX"
author: "me"
date: "date"
output:
  html_document: default
keep_md: true
---

    ```{r setup, include=FALSE}
    knitr::opts_chunk$set(echo = TRUE,
                          fig.path = "Plots/",
                          dev = c("png", "pdf"),
                          fig.width = 10,
                          fig.height = 7,
                          dpi = 300)
    ```

Some text

Code 

Code

Code

```{r myplot, dev="pdf", fig.width=7, fig.height=7}
ggplot......
```

So, with the above, in the folder Plots I have the myplot.pdf but in the HTML file it showed like below:

enter image description here

I need to scroll to view the whole image, and don't get what is that black stuff.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文