Displaying 20 results from an estimated 2000 matches similar to: "ggsave in Linux"
2009 Aug 20
1
ggsave to .png bug in ggplot2 (?)
Text is really small and legend boxes are huge in this plot when saved to
.png with ggsave. Plot is correct (i.e. looks the same as the screen) when
saved with dev.print. Saving to .pdf with ggsave give the correct output.
I'm a noob at ggplot2 so this may be user error rather than a bug. However
the interface to ggsave seems simple enough to exclude many possibilities
for screwing this up
2013 Aug 19
2
Problemas con ggsave(paste('img/',plotName,'.png', sep='')
Estimados usuarios de R:
Soy nuevo en R, le ruego disculpa por mi *Ignorancia*.
Estoy corriendo la siguiente instruccion,
ggsave(paste('img/',plotName,'.png', sep='')
y resulta el error:
ggsave(paste('img/',plotName,'.png', sep='')
Saving 7.32 x 4.87 in image
Error in grDevices::png(..., width = width, height = height, res = dpi, :
2008 Apr 29
1
Annoying bug in package cairoDevice
I sent this to R-Help and the listed maintainer of cairoDevice, I hope that
was the right thing to do.
For some reason, Cairo_png puts a box around a figure when you call
plot.new. It looks like box was called with black and a transparent
background. Example:
> library(cairoDevice)
> Cairo_png('cairo.png')
> plot.new()
> dev.off()
null device
1
The boarder is
2008 May 12
2
ggplot2: font size mismatch for pdf output
Hi
In the following, the graph I see on the screen and the .png output
coincide. However, in the .pdf file, the fonts seem to be scaled
fairly larger, resulting in the label for the top legend disappearing.
Is this an infelicity or bug, or is there something I've missed?
More generally, how do I control the size of fonts used in legends
and axis labels?
library(car)
library(ggplot2)
qp
2013 Aug 26
0
Problemas con ggsave(paste('img/', plotName, '.png', sep='')
Estimado Linis,
Si estás bajo Windows y no has cambiado las rutas (también dentro de las
funciones) es posible que no funcionen bien. Por ejemplo la sentencia
paste('img/',plotName,'.png', sep='')
deberías cambiarla por:
paste('img\',plotName,'.png', sep='')
o incluso por
paste('img\\',plotName,'.png', sep='')
2009 Mar 11
1
Ggplot2: saving a grid with multiple plots
Hi all,
I have managed to create a figure on the screen with multiple plots in
it. Something like the example below. When I save that with ggsave(),
only the last plot gets saved (pPath in the example) instead of the
entire figure. Any suggestions how I can save this kind of figures
automated?
Thanks,
Thierry
library(ggplot2)
pPoint <- qplot(unemploy/pop, psavert, data=economics)
pPath
2012 Sep 30
2
adjust font in ggplot2 to LaTeX document
Hi,
how can i adjust the font in a ggplot2 qplot so that it will look
similar to the LaTeX font?
Computer Modern Sans Serif in the same size would be nice.
My output device is
ggsave(filename="test.pdf", width=5.5, height=3, dpi=300)
and i will include the graphic with 5.5 inch in LaTeX.
I found some pages about that topic but all solutions that i found have
been very complicate
2009 Jul 22
1
Link to documentation in another package
Dear all,
One of the functions that I wrote (ggsave.latex) extents the
functionality of a function (ggsave) in another package (ggplot2).
Instead of copying all the information I would like to create a link in
the helpfile of ggsave.latex to the helpfile of ggsave. I tried
\code{\link{ggsave}} and \code{\link{ggplot2::ggsave}}, but neither
worked. Both cases gave a 'missing link' warning.
2013 Aug 23
0
Problemas con ggsave(...). Estadística Espacial
Estimados usuarios de R:
Estoy corriendo el código de aqui:
http://www.r-bloggers.com/visualizing-baltimore-2-vacant-property-and-some-more-crime/
y correr la siguiente instruccion:
saveKde2Plot(burgDens, 'BurglaryKde2d', 'Burglary\n Density')
Esta función incluye el comando ggsave( ... ), que genera el
siguiente error:
Saving 7.32 x 4.87 in imageError in
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 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
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)
>
> ...
2008 Aug 29
1
ggplot2: Changes to grobs not saved to file output
Hello,
Maybe I missed something - most likely .:-(
I create a gplot and then makes some changes to the plot using grid graphics
functions. These changes show up on the display OK, but when I save using
ggsave() the grid changes do not show up. How do I save the plot with these
changes?
Thanks in advance.
--
View this message in context:
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 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
2009 Apr 10
1
png with ggplot on windows xp
Hi Group,
I posted this question on the ggplot list and was advised to try here
also. The code
below produces a plot as a png and pdf. The pdf looks great, and I cannot
make the png look this way. I've tried various combinations of
height, width, and dpi, but it has not worked out so
far. Any suggestions to make the png look like the pdf? I received a
response that
the problem does not occur
2010 May 31
1
Can not save plot to png file correctly
You can save as png like this too:
library(ggplot2)
data=data.frame(
? X=sample(10,1000,replace=T)
? , Y=letters[1:10])
png("mypng.png")
qplot(X, data=data, geom='histogram') + facet_wrap( ~ Y)
dev.off()
?
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
----- Original Message ----
> From: Peng Yu
2008 Feb 21
2
jpeg() creating empty files with qplot() in a loop
Hello all,
I'm stuck with a strange issue with writing jpegs of plots to a folder
in a loop.
This works:
for (step in 1:length(steps)) {
jpeg(filename=paste("frame_",sprintf("%05d",step),".jpg",sep=""))
plot(steps[[step]])
dev.off()
}
But if I use qplot to generate the plot (which is my aim):
for (step in 1:length(steps)) {
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)*
2010 May 31
0
Put two plots side by side
Two different ways:
library(ggplot2)
x=5
size=50
A=data.frame(X=sample(x, size, replace=T), Y=sample(x, size, replace=T),a=rep(1:2,each=25));A
# Facetting
qplot(X,Y,data=A) + geom_jitter(position=position_jitter(width=.03)) + facet_grid(.~a)
# Or with vp
p=qplot(X, Y, data=A) + geom_jitter(position=position_jitter(width=.03))
ggsave(p, file='main.png')
p1=qplot(X, Y, data=A) +