# About the Qiskit draw function

Where does Qiskit put the rendered figure created by circuit.draw(output='mpl')?

• Are you asking this question because when you run a program with circuit.draw(output='mpl'), the rendered Figure does not show up? Does it look like a new window appears and then instantly closes? Also, are you running this in Jupyter Notebooks or locally in the terminal? I have an answer for both just want to make sure I don't post an answer that doesn't apply to the method you are using. – Matthew Stypulkoski Jun 6 at 18:43
• Yes nothing shows up, in the meantimei don't think i have installed anything related to that. i run code from the terminal – user1319236 Jun 6 at 18:58
• Ok I will answer in regards to this use case then. – Matthew Stypulkoski Jun 6 at 19:30

Qiskit does not save the rendered Figure of the circuit anywhere, unless you provide a filename to the call.
For example: circuit.draw(filename='<file_path>').
In regards to having the Figure render and stay open, you simply need to remove a line of code. If you go to where qiskit is installed in your environment, go into the file qiskit/visualization/matplotlib.py, and go to line 436 you will see the line plt.close(self.figure). Comment this line out, and run your program again. You should see the Figure in a new window.
• I'm not sure of all of the supported file types, but I know that .png, .pdf, and .svg should be supported considering matplotlib uses them as examples on their documentation page – Matthew Stypulkoski Jun 6 at 20:26