microsoft / Qcodes

Modular data acquisition framework
http://microsoft.github.io/Qcodes/
MIT License
322 stars 309 forks source link

QtPlot update not working in Spyder #104

Closed eendebakpt closed 8 years ago

eendebakpt commented 8 years ago

The automatic update of QtPlot that is working in the notebook is not working in Spyder. I can to a plotQ.update() manually.

alexcjohnson commented 8 years ago

I don't know much about Spyder, but it's true, BasePlot is tied to jupyter with the HiddenUpdateWidget, in fact I'm a little surprised you can instantiate either of these plots without error outside of jupyter. These updates are actually triggered in javascript, which then executes the update in the main python process.

If there's a similar route we could take in Spyder that would be great - though for the time being you're probably on your own to implement it.

peendebak commented 8 years ago

Ok. For now I created a custom widget with a a callback function to QtPlot.update(). It works good enough for me.

alexcjohnson commented 8 years ago

Great! If you want, you can put the code for this widget, and other working but not so general code (like the log browser) into the docs/examples folder. Maybe make a spyder subfolder inside there? That kind of thing, that shows how you've used qcodes but doesn't actually change qcodes, wouldn't need to go through a PR, you can commit it directly into master, and could be really useful to others.