1

コードを使用してグラフをクリップボードに保存しました

x = c(1:5)
y = c(1:5)
windows(504, 360) #opens a separate window with the size you want 
plot.new()
plot(x,y, bg = "transparent")#my graph has more information but this would work
savePlot("clipboard", type="wmf")

RDCOMClient を使用して、開いている Powerpoint プレゼンテーションにこのグラフを追加したいと考えています。

PP = PPT.Init(visible = FALSE, method = "RDCOMClient")
PP = PPT.AddTitleSlide(PP, title = "test")
PP = PPT. AddTextSlide(PP, text = "This text will be covered if the graph is in the wrong place")

presentation = PP$pres
slide2 = presentation[["Slides"]][[2]]

PP = PPT.AddGraphicstoSlide(PP) を使用できることはわかっていますが、これでは同じカスタマイズはできません。つまり、プロットから「bg = 'Transparent'」効果を引き継がれません。代わりに、背景に書いているテキストを覆う白い正方形の背景を作成します。これは手動で簡単に修正できますが、何百ものグラフを複数のプレゼンテーションに生成しており、自動化したいと考えています。wmf 形式でクリップボードに保存されているグラフを、PowerPoint プレゼンテーションの正しいスライドに貼り付ける方法はありますか? 助けてくれてありがとう

4

0 に答える 0