0

I tried to develop a GUI to make line plots and generate report using tkinter in python. Now I need to save plots and some comments for that plot into a document file using the tkinter GUI. How to paste the plots in the document file and save the document?

def plott():
    plt.plot(data2['Load'],data2[y.get()])
    plt.ylabel("Y")
    plt.xlabel("Load")
    plt.savefig("plot.png")
    plt.show()

def submit():
    global docx_file 
    import_file_path = filedialog.askopenfilename()
    docx_file = Document(import_file_path)
martineau
  • 119,623
  • 25
  • 170
  • 301
Sadiq Ali
  • 11
  • 4
  • Here's what I found for adding images: [Add an image in a specific position in the document (.docx) with Python?](https://stackoverflow.com/questions/32932230/add-an-image-in-a-specific-position-in-the-document-docx-with-python) – Henry Feb 02 '21 at 09:13
  • Does this answer your question? [Add plots directly to a document using python package docx](https://stackoverflow.com/questions/53536286/add-plots-directly-to-a-document-using-python-package-docx) – acw1668 Feb 02 '21 at 09:48

0 Answers0