Conversation
This reverts commit 6a73916.
Allow to programmatically do something after the loop is done. F.ex save the plot.
The default was 1 second, but I think aiming for 100hz, and using that as default is a bit closer to reality. Then in the examples we can just use the default which makes for less typing for the users!
…to feature/QtPlot
This reverts commit 762a356.
# Resolved Conflicts: # qcodes/plots/pyqtgraph.py
|
@MerlinSmiles , I recently updated our code to use the qcodes plotting for everything. However we do not use datasets but rather add x and y arrays manually (and providing the right labels as well). I was wondering if you preserve this backwards capability, additionally, I think it is a good idea if the qcodes plot monitor supports simple x-y plotting for modularity and simplicity reasons. |
|
@AdriaanRol I dont think I have touched any of that... |
|
Cool, I'll try to check this out this weekend. Seems this PR is in need of some merge support :) |
|
Hi Merlin, I couldn't resist trying it out but I ran into a little problem trying the most trivial example. The following code snippet works on perfectly on master from qcodes.plots.pyqtgraph import QtPlot
p1 = QtPlot()
x = np.linspace(0,10,100)
y = np.sin(x)
p1.add(x=x, y=y)However when I check out your PR, I get the error I pasted below. I think this should be pretty easy to solve (adding a default empty string as title should do). Edit: I tried running your example notebook and I ran into the exact same problem, which I find kind of strange (exact same error message). I am a bit puzzled because if I check out the master branch everything works fine for me and seeing that the notebook I pull in has logged output I can only conclude that it works for you. However, the type of bug I get suggest a simple coding bug due to a changed API and not a weird graphics install type bug. In any case I'd be interested to figure out if you can run this version (exactly as it is in the PR). |
|
@AdriaanRol Which version of pyqtgraph are you using? You need the latest one for this pr. |
|
@AdriaanRol @peendebak not only for this PR but if you follow master you need the last version as well! |
|
@giulioungaretti , I made sure my fork of the master was up to date :). |
|
@peendebak , @MerlinSmiles I'm running pyqtgraph 0.9.10. This is the same as listed in the main qcodes install page and as far as I can tell also the latest (http://www.pyqtgraph.org/). Let me know if I should be using any other version (or what you use to run this notebook). |
|
@AdriaanRol maybe you want to pip upgrade your pyqtgraph to 0.10 https://pypi.python.org/pypi/pyqtgraph ? |
|
@MerlinSmiles @eendebakpt @AdriaanRol ah, but ofc if one checks out this brach/fork the setup.py uses the old versoin still :( or actually a version that does not exist :( |
|
Ok, I've updated pyqtgraph to 0.10.0. I still run into loads of bugs when I run the example notebook.
# The plot-window has a PNG representation, thus the folowing line grabs a "screenshot" of the window:
plotQTraceback attached at bottom of post.
SummaryI find a lot of bugs in stuff that used to work fine and I cannot easily get new things to work on a configuration that used to run everything (my macbook). I would really like to use the improved plotting and see all the new features. I suggest the following changes.
I'd also be interested to see if people can run the current version in the PR, I'd be curious to understand why this is so hard (altough # graphics.... ) Appendix tracebacksError when return the plot object in the notebook. Error on creating a new window with a title : |
|
@AdriaanRol We use this PR in our day to day work, so this issues you find are probably specific to your setup or to the notebook.
|
|
@AdriaanRol Do you have PyQt5 installed? since the switch to qtpy (that allows using pyqt4, pyqt5, or pyside(?)) i guess we have a hard time adding pyqt5 or pyside as dependency? No idea how that works (@Unga) For the interpretation of a non existing argument as an dataset, that is how the original was desined, you probably get the same error in the old qtplot. Not sure if it is so good to expect all extra arguments to be datasets. Either kwargs include x, y, z or they should simply not be data arrays. |
|
@MerlinSmiles, I've updated to PyQt5 and the latest version of PyQtGraph and tried this again today as I'm quite eager to improve the live plotting experience (one might call this procrastination). I still have problems running the version of this branch. This time I get no errors or warnings but just a screen freeze. Let me give an overview of the combinations that work. For all variants I run the following snippet import numpy as np
from qcodes.plots.pyqtgraph import QtPlot
vw = QtPlot(window_title='Title')
x = np.linspace(-10, 10,101)
y=np.cos(x)
vw.add(x=x,y=y)
I'm running
On a Mac. I'm curious to know why this is such a problem for me and if there is anything we can change to make your changes take effect. (or am I just behind and are you guys now doing the small chunks in different PR's?) Best, |
|
@AdriaanRol sorry for my late answer. Also:
|
|
Closing as this will not work with any recent qcodes version, and is by far superseeded by this one: |
New PR from my fork so that we can continue to work on PR #290.
@peendebak @giulioungaretti
#######
Fixes the Qt part of #266
Fixes #259 I think
Fixes the Qt part of #217
Fixes #34 since
setGeometryis now directly available and_repr_png_existsFixes #289 I implemented it here too...
Changes proposed in this pull request:
QtPlot.add()QtPlot.add()(flip x, y axes, and transpose z)nameand array_id, in the case where name exists. however, location is nice to later relate screenshots to the right dataset.updatetoupdate_datainbase.pyso it wont interfere withupdate()from theQwidgetI'm leaving for a holiday now, but it would be great if someone could check this over, and give some input
This PR is mostly meant to fix some of the urgent issues I came across, there is still a lot to do but for that we need to refactor the whole plotting system, which seems somewhat complicated right now. Make it more modular and allow for easy additions...