title: How to export pdf with custom name in gui python?
body: <p>i want to specify a name for my pdf file 
  so it will ask the user but i could not figure out how to take input for and assign to the path the 
  i tried to use asksaveasfilename but it does not save
  so what i need to change in order to click export pdf with custom name</p>
  
  <pre><code>import matplotlib.pyplot as plt
  from matplotlib.backends.backend_pdf import PdfPages
  #import tkintertable 
  import tkinter as tk
  import tkinter.filedialog
  from tkinter.filedialog import asksaveasfilename
  
  def export():
      #x1 = entry1.get()
      with PdfPages(r'C:\Users\Abdul\Desktop\chart1.pdf') as export_pdf:
  
  
          feat_importances = pd.Series(model.feature_importances_, index=X.columns)
          feat_importances.nlargest(10).plot(kind='barh')
          Filename = asksaveasfilename( title='Nmae a file', initialdir='C:\\',filetypes=(("PDF file", "*.pdf*"),))
          export_pdf.savefig()
          plt.show()
      plt.close()
  
  button1 = tk.Button (root,text='Export PDF',command=export, bg='Blue', fg='white')
  canvas1.create_window(120, 150, window=button1)
  
  
  
  
  root.mainloop()
  
  </code></pre>