picture not appearing

Hi,

I am trying to set the size of an image being included in the file below but {Width=10px, Height=10px is not working}

Can you advise how to set the size of the image?

Thank you

Here is the Rmd file:


---
params:
  set_title: "My Title"
title: "Test"
subtitle: "Test"
output: 
  powerpoint_presentation:
    reference_doc: my_template.pptx
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE  )
```

## Slide with Image


![](C:/path_to_image/my_image.png){Width=10%,Height=10%}

Assuming that the image is created with ggplot save it thusly

ggsave(filename="YOUR_NAME.svg", 
plot = last_plot(),
device = 'svg', 
path = 'images',
scale = 1, 
width = 6, 
height = 4, 
units = c("in"),
dpi = "retina", 
limitsize = TRUE)

which can be simpler than fiddling with markdown/HTML/css

Thanks for your response. I am not looking to save the image. It is already saved and I am looking to use {Width=10%, Height=10%} to resize it. The issue is {Width=10%, Height=10%} doesn't seem to work although it is referenced online.

I had seen in the OP that the image was not being generated in the script, but imported. Hence my suggestion.

Too much of data science degenerates into fiddling with reports so that they look good, which can be time better spent with the data and its analysis. My own preference is to defer presentation as long as possible and then deal with all the picky stuff in one pass.

There are alternate approaches to dealing with the image size problem:

  1. At the source, as I suggested
  2. Post-processing with the {egg} package, possibly
  3. Post processing externally by saving to pdf and re-sizing in a vector editor
  4. Attempting to dictate the size in markdown syntax
  5. Attempting to dictate the size in HTML syntax
  6. Attempting to dictate with size in css

Hi,

Pandoc does not yet support this syntax for Powerpoint format.

1 Like