In this article we will see how we can generate the picture of the graph item in PyQTGaph. PyQtGraph is a graphics and user interface library for Python that provides functionality commonly required in designing and science applications. Its primary goals are to provide fast, interactive graphics for displaying data (plots, video, etc.). A Graph is a non-linear data structure consisting of nodes and edges. The nodes are sometimes also referred to as vertices and the edges are lines or arcs that connect any two nodes in the graph. Graph consists of a finite set of vertices(or nodes) and set of Edges which connect a pair of nodes. Generating picture means to generate the graph item’s node and edges as picture.
We can create a graphic layout widget and graphic item with the help of command given below
# creating graphics layout widget win = pg.GraphicsLayoutWidget() # creating a graph item graph_item = pg.GraphItem()
In order to do this we use generatePicturemethod with the graph item object
Syntax : imv.generatePicture()
Argument : It takes no argument
Return : It returns None
Below is the implementation
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- PyQtGraph – Getting Transformed Items of Graph Item
- PyQtGraph – Getting All Child Items of Graph Item
- PyQtGraph – Setting Data of Graph Item
- PyQtGraph – Getting Pixel Padding of Graph Item
- PyQtGraph – Getting X-Axis and Y-Axis Data Bounds of Graph Item
- PyQtGraph – Rectangle Covered by Graph Item
- PyQtGraph – Creating Graph Item
- PyQtGraph – Setting Pen of Graph Item
- PyQtGraph - Getting Parent Item of Scatter Plot Graph
- Post a picture automatically on Instagram using Python
- PyQtGraph - Removing Item from Plot Window
- PyQtGraph - Adding Item to Plot Window
- PyQtGraph - Getting Plot Item from Plot Window
- PyQtGraph – Getting Image Item of Image View
- PyQtGraph – Getting Rotation of Bar Graph
- PyQtGraph – Rotating the Bar Graph
- PyQtGraph – Checking if Bar Graph is Visible
- PyQtGraph - Bar Graph
- PyQtGraph - Line Graph
- PyQtGraph – Setting Position of Bar Graph
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.