Questions tagged [pyqtgraph]

High-performance scientific graphics for PyQt.

PyQtGraph is a pure-python graphics and GUI library built on PyQt4 / PySide and numpy. It is intended for use in mathematics / scientific / engineering applications. Despite being written entirely in python, the library is very fast due to its heavy leverage of numpy for number crunching and Qt's GraphicsView framework for fast display. PyQtGraph is distributed under the MIT open-source license.

987 questions
4
votes
1 answer

drawing a rectangle in pyqtgraph

I am trying to draw rectangles in pyqtgraph to show data in a 2D array, it is inside a window created in designer. Is there a way to draw a rectangle and save the object to a 2D array so i can later update its color? I tried following the custom…
user169808
  • 503
  • 1
  • 6
  • 27
4
votes
1 answer

How to format Y-axis displayed numbers in pyqtgraph?

I see numbers on Y-axis like this: 1.935 1.9325 1.93 1.9275 1.925 But I need to see this: 1.9350 1.9325 1.9300 1.9275 1.9250 How can I set the AxisItem to show always fixed number of digits after decimal point?
Kroll
  • 649
  • 2
  • 6
  • 17
4
votes
3 answers

How to connect mouse clicked signal to pyqtgraph plot widget

I have Qt application where I draw graphs using pyqtgraph lib and use dock containers also from pyqtgraph. So I create several dock containers and put one graph in each. Then, in my code I need to identify the graph with which user is working to…
Ostap
  • 119
  • 2
  • 9
4
votes
1 answer

PyQtgraph - Draw ROI by mouse click & drag

I would like to draw ROI's by click and drag events in the PlotWidget. The issue is that several click interactions are already reserved for the PlotWidget, second it is hard to tell the right position of the mouse in the PlotWidget - especially…
Synaps
  • 323
  • 5
  • 14
4
votes
1 answer

PyQtGraph: prevent QScrollArea scrolling when panning plot

In PyQtGraph you can zoom into the plots with the scroll wheel. However, when embedding PyQtGraph inside a QScrollArea, scrolling both zooms into the hovered plot AND scrolls the QScrollArea. Minimal reproducable code: from PyQt5.QtWidgets import…
kangalio
  • 652
  • 8
  • 16
4
votes
1 answer

Is there a way to hide the x and y axis when using the ScatterPlotItem and PlotCurveItem

I'm plotting a 2-D numpy array using pyqtgraph. I wanted to plot my data without an x or y axis. At the moment my plot looks like this but I don't want an x or y axis. I was hoping for something like this The way I'm plotting is by creating a…
Shah Kamal
  • 43
  • 1
  • 4
4
votes
1 answer

Real-Time-Plotting using pyqtgraph and threading

this is a bit longer, the first part is just a description of the problem, the second one the question if my "fix" is correct. I started with python programming. I created a program that communicates with an Arduino that reads the temperature of a…
Leichti
  • 63
  • 1
  • 8
4
votes
1 answer

How to set the ticks in pyqtgraph

I want to show multi-channel data in a pyqtgraph.PlotWidget(). But when the yRange of the AxisItem() is set, the tick is changed automatically. Just like this: import pyqtgraph as pg from PyQt5.QtWidgets import * from PyQt5.QtCore import * class…
Zhao Zeming
  • 61
  • 1
  • 3
4
votes
2 answers

Embed Pyqtgraph to PySide2

I'd like to implement a PyQtGraph PlotWidget into a PySide2 application. With PyQt5 everything works. With PySide2 I get the Error shown at the bottom. I already found out, that there's some work in progress, but also it seems that a few people…
Sebus
  • 55
  • 1
  • 7
4
votes
0 answers

Pyqtgraph solid fill ROI

I have some code to add a lineout ROI to a pyqtgraph PlotItem self.roi = pg.ROI([c, -x.ptp()/2], [self.pixsize, x.ptp()],pen=pg.mkPen('r',width=1)) self.roi.addScaleHandle([0.5, 0.9], [0.5, 0.5]) self.roi.addRotateFreeHandle([0.5, 0.75],…
Bridgetjs
  • 136
  • 1
  • 7
4
votes
1 answer

Embedding a PyQtGraph into a Tkinter GUI

I have a Tkinter GUI I've been working on for some time that has a live-plotting feature currently built in matplotlib. However, I'm finding matplotlib to be too slow (it seems to build up a lag over time, as if filling up a buffer of frames of…
janizer
  • 117
  • 1
  • 9
4
votes
1 answer

Inverting the Y axis in PyQtGraph

I am developing an app with Python and PyQt4 that plots different parameters against depth. The plotting package is PyQtGraph because of its good animation speed features. Since I am plotting against depth, then I want to invert the Y axis. I have…
Ivy
  • 175
  • 2
  • 14
4
votes
0 answers

Cannot import PyQtGraph because packages PySide, PyQt4, or PyQt5 can't be imported?

I recently downloaded PyQtGraph and am using Python 2.7. I am attempting to run the simple example from the documentation: import pyqtgraph.examples pyqtgraph.examples.run() However, when I attempt to import the package in iPython or in a script, I…
gsamerica
  • 153
  • 1
  • 3
  • 18
4
votes
3 answers

How to change ticks fontsize of a plot using PyQtgraph

everything is in the title, how to change the fontsize of the ticks using pyqtgraph ? Thx
Gregos38
  • 53
  • 1
  • 3
4
votes
2 answers

pyqtgraph widget.addLine change color/width

I want to use the widget function addLine. In my case it is as following: widget.addLine(x=None, y=0.8) #endless horizontal line Now i want to change the color and width of this line, but i cannot find a fitting function. Is there something…
Weevil
  • 87
  • 1
  • 3
  • 8