Editable plots in PowerPoint from python: equivalent of officer and rvg : <p>I am using the <code>officer</code> and <code>rvg</code> packages to get plots from R into MS PowerPoint as editable vector graphics. Reproducible example below.</p>

<p>I am looking for a way to implement an equivalent solution with python, preferably using <code>matplotlib</code>. The critical part is not the creation of slides from the IDE but rather the editable vector graphics part, i.e. plots should end up in PowerPoint as grouped objects comprised of a range of simple powerpoint geometries such as lines, squares, and text fields.</p>

<p>R example:</p>

<pre><code>library(tidyverse)
library(officer)
library(rvg)

# Get some data and make a plot
ggp &lt;- diamonds %&gt;% 
  group_by(clarity) %&gt;%
  summarise(price = mean(price)) %&gt;%
  ggplot(aes(x = clarity, y = price, fill = clarity)) +
  geom_bar(stat = 'identity', colour = 'black')

# Create a new powerpoint document
doc &lt;- read_pptx()
doc &lt;- add_slide(doc, 'Title and Content', 'Office Theme')
# Add the plot 
doc &lt;- ph_with_vg(doc, ggobj = ggp, type = 'body')  

# Write the document to a file
print(doc, target = 'plots.pptx')
</code></pre>

<p>The resulting chart is completely editable:</p>

<p><a href="https://i.stack.imgur.com/iGtG6.png" rel="noreferrer"><img src="https://i.stack.imgur.com/iGtG6.png" alt="enter image description here"></a></p>
