I'm rendering a PDF with mapview. However, the output seems that it was too fast at getting a screenshot of the map and is not rendering it properly.
---
title: "test"
output:
pdf_document: default
html_document: default
date: "2024-04-27"
---
## Mapview rendering in markdown
```{r mapview, fig.width=2}
library(mapview)
library(sf)
mapview(breweries)
```
As you can see in the PDF the scale is way too low and the legend is not in the plot. It also seems that the image is taking the whole space instead of the fig.width=2
. The output of the map should look like this: