pyqtgraph

PyQtGraph with PySide producing tiny, squashed graphs (including the example code)

拈花ヽ惹草 提交于 2019-12-12 02:58:21
问题 I am running Python 3.3 with PySide 1.2.2 and PyQtGraph 0.9.8. The problem I am having is that every graph I try and produce returns an obviously incorrect result. This is the graph I get when I run the basic plotting example that is packaged with PyQtGraph: Rather than what I am supposed to get: (source: pyqtgraph.org) Any ideas? Thanks 回答1: A description of the problem and solution could be found here: pyqtgraph Google Group The problem is caused by a faulty binary installation file from

How to get the pixel coordinates of a plot line in pyqtgraph

落爺英雄遲暮 提交于 2019-12-11 19:51:34
问题 I am drawing a plot with pyqtgraph: wave = pg.PlotWidget(self, QtGui.QColor(0, 0, 0, 0)) wave.plot([1,2,3], [1,2,1], pen=(0,0,255), fillLevel=-0, brush=(255,215,0)) I'd like to get the pixel coordinates of the last point (3,1) How can I do that? 回答1: Qt makes it simple to map between coordinate systems with its QGraphicsItem.map* methods. PyQtGraph further extends these with even more pg.GraphicsItem.map* methods. The one you want works like this: >>> import pyqtgraph as pg >>> plt = pg.plot(

Can I replace an AxisItem on a Qt Creator promoted pyqtgraph widget?

无人久伴 提交于 2019-12-11 19:24:24
问题 I place a widget in Qt Creator and promote it to a PyQtGraph PlotWidget . I'd like to use a custom AxisItem with that widget. Is there any way to replace the existing axis or do I have to subclass PlotWidget? 回答1: There is not currently a way to replace an existing axis; use a subclass as you suggested. 来源: https://stackoverflow.com/questions/18373714/can-i-replace-an-axisitem-on-a-qt-creator-promoted-pyqtgraph-widget

How can I automatically update data in pyqtgraph?

只愿长相守 提交于 2019-12-11 17:20:05
问题 I'm trying to plot candlesticks. I referred to this question and answer( The fastest way to add a new data bar with pyqtgraph ) I want my program to update and plot new candlesticks by receiving new values from a server, through calling update(). A problem that I have is that this example doesn't work without using QtCore.QTimer(). For example, if I manually call update() on the prompt or by apscheduler, candlesticks show no difference, but once I select the plot window, it shows new

PyQt mousePressEvent - get object that was clicked on?

核能气质少年 提交于 2019-12-11 16:17:00
问题 I'm using PyQt and PyQtGraph to build a relatively simple plotting UI. As part of this I have a graphicsview (pyqtgraph's graphicslayoutwidget) that has PlotItems dynamically added to it by the user. What I'm trying to achieve is allowing the user to select a PlotItem by double clicking on it. It's simple enough to get if the user has double clicked somewhere within the widget window, but I can't seem to figure out how to return what was clicked on. Most of my search results have come up with

pyqtgraph for plotting multiple data lists

不问归期 提交于 2019-12-11 14:58:00
问题 At the moment I am using matplotlib to plot multiple numpy arrays (or lists) of data. These correspond to approximately 3000 plots. The plots are time series. My problem is that when these lists become too large with a lot of data, matplotlib is very slow. I read that pyqtgraph can plot really fast, but my question is: Can you use pyqtgraph to plot data without spawning that pyqt window and instead directly save them to files? Matplotlib had an option to change backend so it does not spawn

Graph (pyqtgraph) is not getting plotted inside QML generated window

守給你的承諾、 提交于 2019-12-11 13:53:32
问题 I am trying to plot a graph inside a qml generated window. Since i need to use QML for GUI ( client requirement). I manage to get the graph window inside QML, but its plotting nothing. I dont know my code is correct or not, please suggest, point me in the right direction. main.py: #! /usr/bin/python import os import sys from PySide import QtGui from PySide import QtCore from PySide import QtDeclarative import numpy as np import pyqtgraph as pg class Graph (QtDeclarative.QDeclarativeItem): def

Live Plotting with PyQtGraph in PyQt4 #2

扶醉桌前 提交于 2019-12-11 09:18:54
问题 First of all sorry for the lenght. I want to explain my problem as good as possible. I am quite new to Python and trying to make a plotting app using PyQtGraph embedded in PyQt4. Some days ago I got a really nice answer to my plotting problem, and my next step is to have two PyQtGraphs plot Widgets simoultaneously plotting in the same PyQt4's CentralWidget. By the same approach as in the link described, both plots work fine, but the GUI gets unresponsive. For overcoming this, I am aiming to

Embeding plot into graphicsView in PyQt5

孤街醉人 提交于 2019-12-11 08:41:25
问题 I use pyqtgraph to plot in PyQt5 GUI. I can plot in a pop-up window, but I am trying embed the graph in the graphicsView area. Here is how I can do a simple plot in a new window: self.pushButton.clicked.connect(self.btn_clk) MainWindow.show() def btn_clk(self): L = [1,2,3,4,5] pg.plot(L) I tried to use this line to embed the plot, but it doesn't work: self.pushButton.clicked.connect(self.btn_clk) MainWindow.show() def btn_clk(self): L = [1,2,3,4,5] self.graphicsView.plot(L) Here is the full

Trying get a live plot for a GUI with PyQt5

故事扮演 提交于 2019-12-11 07:30:08
问题 Right now through reading and asking questions I have gotten to a point where I can display the numerical values on LCDs, but now would like to make a graph. In the Picture below there is a picture that I am going to have as a backdrop for the graph. For a Dyno the important information that is gathered is Torque and HorsePower. These I have being calculated with my Python 3.5 Code and the data is being gathered by using an arduino. For my graph I actually want to plot two lines at the same