201909-3 Character drawing CCF CCSP

2023-01-23   ES  

Chapter 13 PyqtdataVisualization 3D Drawing

Data Visualization is a three -dimensional data visualization module in QT, which can draw three -dimensional column -like diagrams, three -dimensional scattered dot diagrams, three -dimensional curved surfaces, etc. Although the function of the data visualization module cannot be compared with some professional three -dimensional graphical libraries (such as VTK), it is simple and easy to use, and it is more practical for simple three -dimensional data. There is no Data Visualization module in PYQT5, and you need to install the PyqtdataVisualization package separately.

This chapter first introduces the basic composition of the PyqtdataVisualization module and the function of the main class, and then introduces the drawing method of the three -dimensional column -like diagram, the three -dimensional scatter dot diagram and the three -dimensional curved surface.

13.1 pyqtdataVisualization module overview

13.2 three -dimensional pillar chart

instance DEMO13_1 uses Q3DBARS chart classes and QBAR3DSeries sequences to draw a three-dimensional column-shaped diagram, and control some common attributes and operations on the interface. The interface interface when running is shown in Figure 13-5.

Figure 13-5 Example DEMO13_1 Running interface

13.3 three -dimensional scattered dots

To draw a three -dimensional scatter dot, you need to use a chart class Q3DSCATTER, a sequence -class QSCATTER3DSERIES and a data proxy QSCATTERDATAPROXY. Example demo13_2 uses these classes to demonstrate the basic methods of three-dimensional scattered dot drawing. The interface when the program is runtime is shown in Figure 13-8. Coordinates can add new scattered points to delete the scatter.

Figure 13-8 Example demo13_2 interface when runtime

13.4 three -dimensional curved surface

Draw the three -dimensional curved surface using the Q3DSURFACE chart class and QSurface3DSeries sequence. According to the different data proxy class, two three -dimensional curved diagrams can be drawn.

  • qsurfacedataproxy data proxy class, draw curved surfaces according to the three -dimensional coordinate of the space point, such as a general three -dimensional function surface. Example demo13_3 demonstrates the drawing of this chart.
  • qHeightMapSurfacedataproxy data proxy class, draw a three -dimensional curved surface according to the data of a picture, typically three -dimensional topography. Example demo13_4 demonstrates the drawing of this chart.

Figure 13-11 Example DEMO13_3 drawn a three-dimensional curved surface

<Previous Chapter>               <Return to the main page>                <Next Chapter>

source

Related Posts

java recursively achieve multi -level menu

manjaro Linux Mongodb and Mariadb installation

ALERT logs encounter an analysis of ORA-04030

HDU1426 Sudoku Killer

201909-3 Character drawing CCF CCSP

Random Posts

PHP and Tencent Live Kobebryant

docker — Install Elasticsearch

Kettle creates and connects mysql resource library to create a conversion Chinese garbled code Kettle MySQL character set

spark reads HIVE data through HiveServer2 JDBC through the HiveServer2 JDBC method.

Blockchain 100 Lecture: Chain code (smart contract) in Hyperledger Fabric