make ggsave quiet

1,050 views
Skip to first unread message

Kasi

unread,
Mar 24, 2011, 9:19:57 PM3/24/11
to ggplot2
Hi,

Is there a way to make ggsave quiet? It currently always prints
something like

"Saving 14" x 14" image"

for each picture. I want to use a nice progress bar on the console and
not see these outputs.

Thanks.

Erik Iverson

unread,
Mar 24, 2011, 10:00:28 PM3/24/11
to Kasi, ggplot2
Kasi,

Looking at ggsave code, that string is produced by a call to the ?message
function. Looking at the docs, you should be able to wrap the ggsave calls in
the ?suppressMessages function to stop it from being displayed, or create your
own wrapper of ggsave to do so automatically.

--Erik

Hadley Wickham

unread,
Mar 24, 2011, 10:23:58 PM3/24/11
to Erik Iverson, Kasi, ggplot2
Or just specify the size of the plot.
Hadley

> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>

--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

Michael Kao

unread,
Mar 24, 2011, 10:06:28 PM3/24/11
to Erik Iverson, Kasi, ggplot2
If you specify both the width and height arg then there wont be a message I think.

e.g. ggsave("test.pdf", width = 14, height = 14)


--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442

To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2

Michael Kao
RedBox Data Analyst
Data Team




Ogilvy New Zealand | 22 Stanley St  Parnell  Auckland

Reply all
Reply to author
Forward
0 new messages