similar to: can't print ggplot with Chinese characters to pdf files

Displaying 20 results from an estimated 700 matches similar to: "can't print ggplot with Chinese characters to pdf files"

2017 Oct 13
1
[FORGED] can't print ggplot with Chinese characters to pdf files
Hi Instead of ... ggsave("test_plot_chinese.pdf", m2) ... try ... cairo_pdf("test_plot_chinese.pdf") print(m2) dev.off() Paul On 13/10/17 02:12, John wrote: > I install the Chinese font "Kaiti TC" on my mac, but I can't print the > figures to pdf file by "marrangeGrob" command, which is in the package > "gridExtra". Error message
2017 Oct 13
4
[FORGED] can't print ggplot with Chinese characters to pdf files
Hi By the looks of it, you need to install Cairo graphics ... https://www.cairographics.org/download/ Paul On 13/10/17 15:48, John wrote: > Thanks, Paul. Following your solution, ?I got this error message: > > Warning message: > In cairo_pdf("test_plot_chinese.pdf") : failed to load cairo DLL > > Is there anything else I need to install? > > Thanks, >
2017 Oct 13
0
[FORGED] can't print ggplot with Chinese characters to pdf files
Thanks, Paul. Following your solution, I got this error message: Warning message: In cairo_pdf("test_plot_chinese.pdf") : failed to load cairo DLL Is there anything else I need to install? Thanks, John 2017-10-12 19:24 GMT-07:00 Paul Murrell <paul at stat.auckland.ac.nz>: > Hi > > Instead of ... > > ggsave("test_plot_chinese.pdf", m2) > > ...
2017 Oct 16
0
[FORGED] can't print ggplot with Chinese characters to pdf files
Hi, Sorry to bother you with this question here. I tried to install Macports on my Mac OS Sierra, and type "sudo port install cairo", but it did not respond. I haven't seen any file name or app called Macports, but one file called "port" which is located at loca/bin/port" How should I do it? Thanks, John ******* Last login: Sun Oct 15 02:52:49
2017 Oct 20
0
[FORGED] can't print ggplot with Chinese characters to pdf files
Hi, Following Paul's instruction, I have installed the Cairo. I tried to run the program, and there is no error message at all. I did see the Chinese title in the plot if I ask my RStudio to show the plot (if I type "p1"), but the pdf file shows the plots without the Chinese titles. library(ggplot2) library(gridExtra) df1<-data.frame(x=1:2, y=3:4, z=5:6) #p1<-ggplot(df1,
2016 Apr 09
3
How to print the graphs in landscape/portrait orientation
Hi, I made a few graphs by ggplot. The following codes produce a pdf file with graphs in landscape orientation on my Windows PC, while they produce a pdf file with the same graphs, but in portrait orientation: *p2 <- lapply(1:(2*n), function(.x) xyz_outl[.x][[1]]) #a sequence of graphs made by ggplot* *m2 <- marrangeGrob(p2, nrow=3, ncol=2) * *ggsave("xyz.pdf", m2)*
2013 Sep 26
1
Less than equal to symbol in ggplot2 legend text
Hello, I am trying to add a less than equal to symbol in a ggplot2 legend text. See sample code below. I have tried using the expression function and \u2264. I also tried adding labels to legend.text under theme. Neither of these 3 options work. Please help, Mahesh ++++++++++++++ Extra.column=ifelse(data[,covariate]>cutpoint,1,0) Grp1 <- "\u2264 1.5" Grp2 <-
2017 Nov 02
3
ggplot inside function doesn't plot
I have a function: myplot <- function (X) { d <- plotCounts(dds2, gene=X, intgroup="condition", returnData=TRUE) png(paste("img/", X, ".png", sep="")) ggplot(d, aes(x=condition, y=count, color=condition)) + geom_point(position=position_jitter(w=0.1,h=0)) + scale_y_log10(breaks=c(25,100,400)) + ggtitle(X) +
2017 Nov 02
3
ggplot inside function doesn't plot
I don't really understand. I mean, I understand the solution is print(ggplot(...)). But why is that required in a function and not at the console? Shouldn't I be able to rely on what I do at the console working in a script? Is this inconsistent behavior by design? On Thu, Nov 2, 2017 at 11:54 AM, David Winsemius <dwinsemius at comcast.net> wrote: > >> On Nov 2, 2017,
2017 Nov 02
0
ggplot inside function doesn't plot
> On Nov 2, 2017, at 9:27 AM, Ed Siefker <ebs15242 at gmail.com> wrote: > > I have a function: > > myplot <- function (X) { > d <- plotCounts(dds2, gene=X, intgroup="condition", returnData=TRUE) > png(paste("img/", X, ".png", sep="")) > ggplot(d, aes(x=condition, y=count, color=condition)) + >
2012 Aug 07
1
Styling gridExtra's title and left labels
Hi, I'm using the gridExtra package to combine some graphs like in the arrangeGrob example. Each of the graphs has a title but they appear much larger than the overall combined plot title and left axis label. Does anyone know how I can control the style / size of the gridExtra labels? library(gridExtra) library(ggplot2) dsamp <- diamonds[sample(nrow(diamonds), 1000), ] p1 <-
2015 Jun 16
4
Ayuda boxplot ggplot2
Hola a todos Me gustaría saber si me pueden ayudar con lo siguiente. Realicé un Boxplot usando ggplot2 para visualizar el comportamiento de dos variables. Visualmente no se notan las diferencias porque la gráfica de la derecha (parásitos en el abdomen) llega hasta 20 en el eje y. ¿Cómo puedo hacer para que las dos gráficas muestren la misma escala en el eje Y, es decir, que las dos lleguen a 60?
2013 Mar 06
6
Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?
Hi, # For publications, I am not allowed to repeat the axes. I have tried to remove the axes using: # yaxt="n", but it did not work. I have not understood how to do this in ggplot2. Can you help me? # I also do not want loads of space between the graphs (see below script with Dummy Data). # If I could make it look like the examples on the (nice) examples page: #
2016 Apr 10
0
How to print the graphs in landscape/portrait orientation (revised)
Hi, I made a few graphs by ggplot. The following codes produce a pdf file with graphs, sometimes in landscape orientation, sometimes in portrait orientation. I am using both Mac and Windows PC. Question: how can I control the orientation of the pdf file? I try to add a line pdf(paper = ?USr?) (or pdf(paper="letter")) in the following code, but it does not work.
2020 Oct 08
2
2 D density plot interpretation and manipulating the data
Hello, I have a data frame like this: > head(SNP) mean var sd FQC.10090295 0.0327 0.002678 0.0517 FQC.10119363 0.0220 0.000978 0.0313 FQC.10132112 0.0275 0.002088 0.0457 FQC.10201128 0.0169 0.000289 0.0170 FQC.10208432 0.0443 0.004081 0.0639 FQC.10218466 0.0116 0.000131 0.0115 ... and I am creating plot like this: s <- ggplot(SNP, mapping = aes(x = mean, y = var))
2020 Sep 27
2
GRÁFICO DE BARRAS COMPARATIVO VARIOS AÑOS
Buenas noches, Tengo que preparar un gráfico de barras comparativo para varios años, en el que tenga agrupadas, 3 barras para enero, 3 barras para febrero, 3 barras para marzo y así sucesivamente para todos los meses, estando en cada mes, los años 2020, 2019 y 2018 (juntas), un pequeño espacio y luego las de febrero y así sucesivamente... Con el siguiente código, hago un año:
2020 Oct 04
3
Leyenda gráfico combinado
Hola buenos días hice un gráfico combinado de líneas, puntos y barras en ggplot2, pero no sé cómo puedo poner la leyenda de eso gráfico para que me represente para las líneas con puntos los valores estimados por un modelo y observados. este es mi código: ggplot(MLM,aes(x=Individuo)) + geom_bar(aes(y=Observada), stat = "identity", color= "gray") + geom_line(aes(y=Estimada),
2012 Sep 16
1
How to plot two lines, and only one line with errorbar by qqplots of R
Here is my code, which plots three lines with errorbar. How could I add an extra line without errorbar to the plot? Thank you very much. beta.data <- data.frame ( method = rep(c("Wrong", "Correct", "Full Bayes"), each = T_obs), mean.beta = c(mean.beta1, mean.beta2, mean.beta3), t = rep(points, 3), std.beta = c(std.beta1, std.beta2, std.beta3) ) limits =
2020 Oct 09
0
2 D density plot interpretation and manipulating the data
Hi Abby, Thanks for getting back to me, yes I believe I did that by doing this: SNP$density <- get_density(SNP$mean, SNP$var) > summary(SNP$density) Min. 1st Qu. Median Mean 3rd Qu. Max. 0 383 696 738 1170 1789 where get_density() is function from here: https://slowkow.com/notes/ggplot2-color-by-density/ and keep only entries with density > 400
2019 Sep 24
2
help: boxplot multivariables
Hola Lorena: Lo prometido es deuda. Dije que miraría si iba este asunto: ggplot(data = dLSaa, aes(x = factor(AA), y = AD, colour = factor(AA))) + geom_boxplot() + xlab( "AA" ) + ylab( "AD" ) + labs(colour = "Leyenda") + ggtitle(label = "Comparación de AD frente a AA") Y este es el resultado: [image: