Why are some graphics not displayed when I knit my RMarkdown script?

I use RMarkdown with the rmdformats readthedown template to generate reports.

I create my charts with the plotly package but some charts don’t display when I knit the script although they run fine on R separately.

I only have the echo = FALSE option, but it works for some charts but not for others, even though they’re all created with plotly.

Here is a part of my script : (In french because I’m french, the first chart is working but not the second)


title: “Rapport Test”
date: “r Sys.Date()
author: “Sesiom”
output:
rmdformats::readthedown:
highlight: kate
main_font: “serif”
sidebar:
width: 300px
position: left

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>## Global options
knitr::opts_chunk$set(cache = TRUE)
library(ggplot2)
library(dplyr)
library(tidyr)
library(plotly)
library(knitr)
library(kableExtra)
</code>
<code>## Global options knitr::opts_chunk$set(cache = TRUE) library(ggplot2) library(dplyr) library(tidyr) library(plotly) library(knitr) library(kableExtra) </code>
## Global options
knitr::opts_chunk$set(cache = TRUE)
library(ggplot2)
library(dplyr)
library(tidyr)
library(plotly)
library(knitr)
library(kableExtra)

Évolution du Nombre Total d’Utilisateurs au Fil du Temps

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>plot_ly(data, x = ~Date, y = ~Total_users, type = 'scatter', mode = 'lines+markers', hoverinfo = 'text',
text = ~paste("Date: ", Date, "<br>Valeur: ", Total_users), name = "Nombre d'utilisateurs") %>%
layout(xaxis = list(title = "Date"),
yaxis = list(title = "Valeur"),
showlegend = TRUE,
legend = list(x = 1.1, y = 0.5, orientation = "h", xanchor = "center", yanchor = "middle"))
</code>
<code>plot_ly(data, x = ~Date, y = ~Total_users, type = 'scatter', mode = 'lines+markers', hoverinfo = 'text', text = ~paste("Date: ", Date, "<br>Valeur: ", Total_users), name = "Nombre d'utilisateurs") %>% layout(xaxis = list(title = "Date"), yaxis = list(title = "Valeur"), showlegend = TRUE, legend = list(x = 1.1, y = 0.5, orientation = "h", xanchor = "center", yanchor = "middle")) </code>
plot_ly(data, x = ~Date, y = ~Total_users, type = 'scatter', mode = 'lines+markers', hoverinfo = 'text',
        text = ~paste("Date: ", Date, "<br>Valeur: ", Total_users), name = "Nombre d'utilisateurs") %>%
  layout(xaxis = list(title = "Date"),
         yaxis = list(title = "Valeur"),
         showlegend = TRUE,
         legend = list(x = 1.1, y = 0.5, orientation = "h", xanchor = "center", yanchor = "middle"))

Ce graphique illustre l’évolution du nombre total d’utilisateurs au fil du temps. Sa représentation visuelle offre un aperçu précieux de la croissance de notre base d’utilisateurs, ce qui est essentiel pour évaluer la performance de notre entreprise. En observant les variations dans le nombre d’utilisateurs, nous pouvons facilement identifier les tendances de croissance ou de déclin, ce qui nous permet de prendre des décisions stratégiques éclairées. Cette analyse nous aide à comprendre l’impact de nos initiatives commerciales et marketing, ainsi que l’efficacité de nos efforts pour acquérir de nouveaux utilisateurs. En somme, ce graphique nous fournit des informations précieuses pour guider nos stratégies de croissance et maximiser notre impact sur le marché.

Évolution du Nombre d’Utilisateurs ayant Scrollé au Fil du Temps

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>plot_ly(data, x = ~Date, y = ~Scrolled_users, type = 'scatter', mode = 'lines+markers', hoverinfo = 'text',
text = ~paste("Date: ", Date, "<br>Valeur: ", Scrolled_users), name = "Nombre d'Utilisateurs") %>%
layout(xaxis = list(title = "Date"),
yaxis = list(title = "Valeur"),
showlegend = TRUE,
legend = list(x = 1.1, y = 0.5, orientation = "h", xanchor = "center", yanchor = "middle"))
</code>
<code>plot_ly(data, x = ~Date, y = ~Scrolled_users, type = 'scatter', mode = 'lines+markers', hoverinfo = 'text', text = ~paste("Date: ", Date, "<br>Valeur: ", Scrolled_users), name = "Nombre d'Utilisateurs") %>% layout(xaxis = list(title = "Date"), yaxis = list(title = "Valeur"), showlegend = TRUE, legend = list(x = 1.1, y = 0.5, orientation = "h", xanchor = "center", yanchor = "middle")) </code>
plot_ly(data, x = ~Date, y = ~Scrolled_users, type = 'scatter', mode = 'lines+markers', hoverinfo = 'text',
        text = ~paste("Date: ", Date, "<br>Valeur: ", Scrolled_users), name = "Nombre d'Utilisateurs") %>%
  layout(xaxis = list(title = "Date"),
         yaxis = list(title = "Valeur"),
         showlegend = TRUE,
         legend = list(x = 1.1, y = 0.5, orientation = "h", xanchor = "center", yanchor = "middle"))

Ce graphique présente l’évolution du nombre d’utilisateurs ayant scrollé au fil du temps. Le fait de scroller sur une page web indique généralement un niveau d’engagement plus élevé de la part des utilisateurs, car ils interagissent activement avec le contenu en faisant défiler la page. En traçant les données du nombre d’utilisateurs ayant scrollé par rapport à la date, nous pouvons suivre de près l’évolution de cet engagement au fil des périodes. Une tendance à la hausse du nombre d’utilisateurs ayant scrollé peut indiquer une augmentation de l’interaction et de l’intérêt pour le contenu, tandis qu’une tendance à la baisse peut signaler des problèmes potentiels ou des baisses d’engagement. La présence de marqueurs sur la ligne permet une identification facile des valeurs individuelles à chaque point temporel. Ce graphique nous permet de surveiller de près l’engagement des utilisateurs avec notre plateforme et de prendre les mesures nécessaires pour améliorer l’expérience utilisateur et favoriser une interaction plus profonde avec notre contenu.

I’ve tried to modify the size of the graphic with fig.height and fig.width but to no avail, I’ve also tried to manage the parameters of the RMardowk block by adding warning = FALSE but still nothing.

New contributor

Kilian Giraud is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật