[R] Plots in ioslides and R markdown
Duncan Murdoch
murdoch@dunc@n @end|ng |rom gm@||@com
Sun Aug 26 02:10:14 CEST 2018
On 25/08/2018 7:37 PM, Patrick Connolly wrote:
> On Sat, 25-Aug-2018 at 07:53AM -0400, Duncan Murdoch wrote:
>
> |> On 25/08/2018 6:21 AM, Patrick Connolly wrote:
> |> >---
> |> >title: "Barking up the wrong tree"
> |> >author: "Patrick Connolly"
> |> >date: "`r format(Sys.time(), '%a %d/%m/%Y %H:%M')`"
> |> >output:
> |> > ioslides_presentation: default
> |> > slidy_presentation: default
> |> > beamer_presentation: default
> |> >---
> |> >
> |> >```{r global_options, echo=FALSE}
> |> >knitr::opts_chunk$set(tidy=TRUE,
> |> > warning=FALSE,
> |> > message=FALSE,
> |> > cache=FALSE,
> |> > dpi = 300)
> |>
> |> Drop the dpi setting and it will work fine.
>
> Still doesn't avoid what I think is the issue with Cairo
>
> Error in axis(side = side, at = at, labels = labels, ...) : X11
> font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 12
> could not be loaded Calls: <Anonymous> ... plot.default -> localAxis
> -> Axis -> Axis.default -> axis
>
> Execution halted
>
>
> For interactive plotting, Rstudio plots those 6 plots on one page so
> no issue is apparent, as it will if I use a pdf device within ESS.
So use RStudio, don't use ESS.
> However, when plotting interactively in ESS, a basic font is used for
> the labels which is OK for preliminary quick look. No error message
> is shown, but I suspect that it is defaulting to a crude font because
> the helvetica font is not available.
>
> It appears to me that the font problem doesn't arise with Rstudio
> unless the desired output is ioslides. Which brings us back to the
> issue with Cairo. There are lots of hits when I search for
> configuring fonts, Cairo and R but I've not found anything I can use.
>
I don't see a font problem in MacOS. I don't think you've stated what
system you are using (but I may have missed it).
Duncan Murdoch
> I would appreciate pointers where I can find useful information.
>
> Thank you.
>
> |>
> |> Duncan Murdoch
> |>
> |> >```
> |> >## 6 different Regression Trees
> |> >
> |> >```{r 6 different Regression Trees, echo = FALSE, messages=FALSE, fig.width = 7, fig.height = 5}
> |> >
> |> > par(mfrow = c(2, 3))
> |> >plot(1:10)
> |> >plot(12:4)
> |> >plot(seq(0, 800))
> |> >plot(-100:-900)
> |> >plot(12:50)
> |> >plot(90:54)
> |> >```
>
More information about the R-help
mailing list