Re: GGSAVE does not save a good version of my graph
Ian Worthington via R-help <[email protected]> Sat, 25 Jul 2026 02:34:39 +0000 (UTC)
| Newsgroups | gmane.comp.lang.r.general |
|---|---|
| Message-ID | <[email protected]> |
Ican --
Is there any documentation as to the best /type/ to use with a particular /=
device/?=C2=A0 =C2=A0 I'm outputting to PNG on Windows, for instance: shoul=
d I be using a specific type?=C2=A0=C2=A0
Best wishes / Mejores deseos /=C2=A0=C2=A0Meilleurs v=C5=93ux
Ian=C2=A0... =
On Friday, July 24, 2026 at 07:08:45 AM GMT-5, Ivan Krylov via R-help <=
[email protected]> wrote: =
=
=D0=92 Thu, 23 Jul 2026 20:18:38 +0000
"Sorkin, John" <[email protected]> =D0=BF=D0=B8=D1=88=D0=B5=D1=82:
>=C2=A0 ggsave(plot=3Dzz,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 path=3Dmypath,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 filename=3Dmyfilename,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 device=3D"tiff",
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 width=3D4,height=3D3,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 units=3D"in",
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 dpi=3D600)
Hard to give a better answer without seeing the plot, but since you're
on Windows, try giving the additional argument type=3D"cairo" to
ggsave(...). Otherwise tiff() uses the old GDI code that doesn't
perform anti-aliasing. The RStudio graphical device is distinct from
tiff() and performs anti-aliasing as well.
(Is is a requirement of your publisher to submit TIFF plots? It may be
possible to preserve them in higher quality as PDF files.)
-- =
Best regards,
Ivan
______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.ht=
ml
and provide commented, minimal, self-contained, reproducible code.
=
[[alternative HTML version deleted]]