-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The picture in Rstudio is displayed in Chinese - ragg need to be used #579
Comments
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:
…---
```{r echo=FALSE}
library(ggplot2)
df <- data.frame(性别 = c("男","女"),
人数 = c(48,45))
ggplot(df,aes(x = 性别,y = 人数,fill = 性别)) +
geom_bar(stat = "identity")
```
![1](https://github.com/davidgohel/officedown/assets/64447691/5c9f9412-1bad-496f-81c3-aeaf66ccc370)
![2](https://github.com/davidgohel/officedown/assets/64447691/7972fb9d-1faf-40b3-a3e9-0aa809f4e176)
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?
|
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! |
davidgohel
changed the title
The picture in Rstudio is displayed in Chinese
The picture in Rstudio is displayed in Chinese - ragg need to be used
Oct 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)
The text was updated successfully, but these errors were encountered: