I use the packs officerand rvgto obtain graphs of R in MS PowerPoint in the form of editable vector graphics. Playable example below.
I am looking for a way to implement an equivalent solution using Python, preferably using matplotlib. The most important part is not creating slides from the IDE, but the editable part of vector graphics, i.e. graphs should end in PowerPoint as grouped objects consisting of a series of simple PowerPoint geometries, such as lines, squares, and text fields.
Example R:
library(tidyverse)
library(officer)
library(rvg)
ggp <- diamonds %>%
group_by(clarity) %>%
summarise(price = mean(price)) %>%
ggplot(aes(x = clarity, y = price, fill = clarity)) +
geom_bar(stat = 'identity', colour = 'black')
doc <- read_pptx()
doc <- add_slide(doc, 'Title and Content', 'Office Theme')
doc <- ph_with_vg(doc, ggobj = ggp, type = 'body')
print(doc, target = 'plots.pptx')
The resulting diagram is fully editable:

source
share