ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð°ÝPython¤¤plt¹ÏÂà¶Kword®ÑÅÒ¦ì¸m¤è¦¡

[µo°Ý] ½Ð°ÝPython¤¤plt¹ÏÂà¶Kword®ÑÅÒ¦ì¸m¤è¦¡

¦U¦ì«e½ú¡B¤j¤j , ½Ð±Ð¤@¤U
¦³¨S¦³¤°»ò¤è¦¡¥i¥H§âpythonµe¥Xªº¹Ï¶K¨ìowrd®ÑÅÒ¦ì¸m©O?
§Úºô¸ô§ä¤F¤@¤U , ¦³§ä¨ì¦r¦ê¶Kªº¤è¦¡ , ¦p¤U
¦pªG­n¶Kplt¹Ï , ¬O¤£¬O¤]¥i¥H³o¼Ë¶K? ©Î¬O¦³¤°»ò§ó¦nªº«Øij¥i¥H¤À¨É¶Ü?
«D±`·PÁÂ ~

import matplotlib.pyplot as plt
import numpy as np
import win32com.client as win32
from win32com import client

a=plt.scatter( np.linspace(1,10,10),np.linspace(2,20,10) )
wordApp = win32.gencache.EnsureDispatch('Word.Application') #create a word application object
word = client.Dispatch("Word.Application")
wordApp.Visible = False # hide the word application
doc = word.Documents.Open(r'C:\report.docx') # opening the template file
rng=doc.Bookmarks("unm_3").Range # change the string Name to whatever name of your bookmarks
rng.InsertAfter("Hello World")
plt.show()
MLB

        ÀR«ä¦Û¦b : ¤@­Ó¤Hªº§Ö¼Ö¡D¤£¬O¦]¬°¥L¾Ö¦³±o¦h¡A¦Ó¬O¦]¬°¥L­p¸û±o¤Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD