Open JTCDCTWB opened 11 months ago
hello,
What happen if you use ragg in RStudio default plot settings? Does it solve the issue?
KR
Thank you very much for your warm reply! According to your suggestion the problem was solved!
At 2023-10-13 13:38:23, "David Gohel" @.***> wrote:
hello,
What happen if you use ragg in RStudio default plot settings? Does it solve the issue?
KR
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
*Thank you so much for your work!
Draw pictures in "officedown" with word exported in Chinese, sometimes the picture is not displayed, sometimes the Chinese is not displayed. The code is as follows:
output:
officedown::rdocx_document:
library(ggplot2)
df <- data.frame(性别 = c("男","女"),
人数 = c(48,45))
ggplot(df,aes(x = 性别,y = 人数,fill = 性别)) +
geom_bar(stat = "identity")
Operating environment:
Windows 11 22H2
R version 4.3.1
Rstudio version 2023.09.0 Build 463
officedown version 0.3.1
The above problems have been reported to officedown
At 2023-10-13 13:38:23, "David Gohel" @.***> wrote:
hello,
What happen if you use ragg in RStudio default plot settings? Does it solve the issue?
KR
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
What happen if you use ragg in knitr settings? Does it solve the issue?
knitr::opts_chunk$set(dev="ragg_png")
Thank you!Problem solved.
The issue (not solved or not documented yet) will need some work. Package 'ragg' is used by flextable, but I don't understand why it conflicts with your environment. This has already been reported. I will close the issue when it will be solved. Thank you for opening the issue!
As a user of Officeverse,I am really grateful for your contributions!
Meanwhile, a BUG was found during application, that is after loading any package of "flextable", "officer" and "officedown", the images with Chinese characters could not be plotted into Chinese in Rstudio. If the images with Chinese characters was plotted first, then loading the above three packages, everything is OK.
R:4.3.1; Rstudio:2023.09.0 Build 463; Operating System:Win11(22H2) or Win10(LTSC 2019 21H2)
Looking forward to your reply at your earliest convenience.
library(tidyverse) library(flextable) library(officer) tibble(性别 = c("男","女"),人数 = c(69,59)) %>% ggplot(aes(性别,人数)) + geom_point()
Restart Rstudio
library(tidyverse) tibble(性别 = c("男","女"),人数 = c(69,59)) %>% ggplot(aes(性别,人数)) + geom_point() library(flextable) library(officer)