[R] about saving format

Ulrik Stervbo ulrik.stervbo at gmail.com
Sun Aug 6 07:13:34 CEST 2017


I have no clue how Rstudio saves plots, but when I was writing directly to
the pdf plot device I had similar problems. Setting useDingbats = TRUE made
everything work well.

I think it is more prudent - and less clicking here and there - to save
plots from within the script.

I imagine this works as expected:

pdf(useDingbats = TRUE)
plot(0, xlab = "Percent (‰)", ylab = "Another Percent (‰)”)
dev.off()

Best,
Ulrik

Duncan Murdoch <murdoch.duncan at gmail.com> schrieb am So., 6. Aug. 2017,
03:44:

> On 05/08/2017 9:10 PM, Bert Gunter wrote:
> > If the OP is using RStudio and not using R  (i.e. pdf()) directly, it
> > sounds like this query should be directed to RStudio support, not
> > here.
>
> Two things:
>
> First, to Lily: "‰" is the "per mil" symbol, not percent; it's not an
> ASCII symbol, which is why there are issues displaying it.  If you
> really mean percent, use "%" and you likely won't have problems.
>
> And to confirm what Bert said:  this does work in R even if you use
> dev.copy() to copy from the regular R graphics device to pdf, but not
> from the RStudioGD to pdf.  So this really is an RStudio bug.
>
> Duncan Murdoch
>
> >
> > Cheers,
> > Bert
> >
> >
> > Bert Gunter
> >
> > "The trouble with having an open mind is that people keep coming along
> > and sticking things into it."
> > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
> >
> >
> > On Sat, Aug 5, 2017 at 5:54 PM, Ismail SEZEN <sezenismail at gmail.com>
> wrote:
> >>
> >>> On 6 Aug 2017, at 03:47, lily li <chocold12 at gmail.com> wrote:
> >>>
> >>> In the lower right panel of R-studio interface, there is the "Export"
> button. I saved as PDF from there directly, rather than using functions
> >>>
> >>> On Sat, Aug 5, 2017 at 6:18 PM, Ismail SEZEN <sezenismail at gmail.com>
> wrote:
> >>>
> >>>> On 6 Aug 2017, at 03:01, lily li <chocold12 at gmail.com> wrote:
> >>>>
> >>>> I am using the plot() function, but have a problem. When saving as pdf
> >>>> format, the ‰ sign in the x-axis label becomes (...) sign. I prefer
> to save
> >>>> in pdf, as this format has a higher resolution than jpeg or other
> picture
> >>>> formats. Could anyone tell me how to do then? Thanks.
> >>>
> >>> Please, share minimal example. which function do you use to save the
> plot as pdf? ‘pdf' or ‘cairo_pdf’ or something else?
> >>
> >> I used the code below, and used export button to save as pdf. It saves
> as expected. Please, minimize your code as below and share. So I can try on
> my machine.
> >>
> >> plot(0, xlab = "Percent (‰)", ylab = "Another Percent (‰)”)
> >> ______________________________________________
> >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >> https://stat.ethz.ch/mailman/listinfo/r-help
> >> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> >> and provide commented, minimal, self-contained, reproducible code.
> >
> > ______________________________________________
> > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

	[[alternative HTML version deleted]]



More information about the R-help mailing list