Saturday, May 14, 2016

Qt Vs Tkinter Backend-Matlabplot in Python

Being a beginner to Python, I was lost in iPython provided by Anaconda. This post is helpful if you are only using Spyder as your Python interface.

In the process of developing a very basic GUI to input graph nodes into Python and Gurobi I came across this insight.

If you are familiar with "matplotlib" you can understand that you can't plot directly or perform "ginput" from ipython console as by default Python is set to Inline. I had read through Stackoverflow that we need to change preferences in the Tool --> Preferences Option.


Under iPython Console option you can find the graphics Tab. In this window change your backend to TKinter. If you are interested read through what actually QT and TKinter is about, I am just here to specify that QT backend was quite slow in response vs TKinter in plotting matplotlib.


I dont want to add a Video explaining this because I am kinda lazy. If you are one too just use TKinter and if you are an experimenter test with both the cases. 

All these claims are only based on my limited knowledge. I don't claim and neither am I an expert in Python. This post is just a reminder for myself as my memory is highly volatile. 

Dont forget to Restart Spyder !! For dummies like me :)


No comments:

Post a Comment