search for: marrangegrob

Displaying 8 results from an estimated 8 matches for "marrangegrob".

2017 Oct 13
1
[FORGED] can't print ggplot with Chinese characters to pdf files
...tead 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 after I type "ggsave(......)" (last line of the > program): > > "Saving 7.47 x 5.15 in image > Error in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y, : > invalid fon...
2017 Oct 12
2
can't print ggplot with Chinese characters to pdf files
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 after I type "ggsave(......)" (last line of the program): "Saving 7.47 x 5.15 in image Error in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y, : invalid font type In addition: There were...
2016 Apr 09
3
How to print the graphs in landscape/portrait orientation
...raphs 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)* Question: how can I let the graphs printed in landscape orientation on my Mac? I try to add the following line before the above code, but it does not work. *pdf(paper = "Usr")* Thanks! [[alternative HTML version deleted...
2017 Oct 13
4
[FORGED] can't print ggplot with Chinese characters to pdf files
...t;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 after I type "ggsave(......)" (last > line of the > program): > > "Saving 7.47 x 5.15 in image > Error in grid.Call.graphics(L_text, a...
2017 Oct 13
0
[FORGED] can't print ggplot with Chinese characters to pdf files
...> ... 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 after I type "ggsave(......)" (last line of the >> program): >> >> "Saving 7.47 x 5.15 in image >> Error in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y, &gt...
2017 Oct 16
0
[FORGED] can't print ggplot with Chinese characters to pdf files
...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 after I type "ggsave(......)" (last >> line of the >> program): >> >> "Saving 7.47 x 5.15 in image >> Error in g...
2017 Oct 20
0
[FORGED] can't print ggplot with Chinese characters to pdf files
...eom_line()+ggtitle("??") p1<-p1+theme(text = element_text(family = "Kaiti TC")) p2<-p2+theme(text = element_text(family = "Kaiti TC")) p<-array(list(NA), dim=2) p[[1]]<-p1 p[[2]]<-p2 p_series <- lapply(1:(length(p)), function(.x) p[.x][[1]]) m2 <- marrangeGrob(p_series, nrow=2, ncol=1) #ggsave("test_plot_chinese.pdf", m2) cairo_pdf("test_plot_chinese.pdf") print(m2) dev.off() 2017-10-12 19:55 GMT-07:00 Paul Murrell <paul at stat.auckland.ac.nz>: > Hi > > By the looks of it, you need to install Cairo graphics ... &g...
2016 Apr 10
0
How to print the graphs in landscape/portrait orientation (revised)
...ary(gridExtra) # Output graphs to files n<-100 p2<-array(list(NA),dim=n) # pdf(paper = "Usr") # pdf(paper = "letter") for(i in 1:n) { p2[i][[1]]<-ggplot(data.frame(x=1:(i+1), y=seq(2,2*(i+1),2)), aes(x=x, y=y))+ geom_line(color="blue") } m2 <- marrangeGrob(p2, nrow=3, ncol=2) ggsave("test_160409xyz.pdf", m2) ################## [[alternative HTML version deleted]]