PyQt5/PyQt

How pyqt5 do I draw the following picture?

lyl1836 opened this issue · 1 comments

Dear teacher
I want to pyqt5 draw the following picture.

p2

Detailed requirements:
1、On the outside is a K-line diagram, and inside is a table or text group.
2、You want the graphics to zoom with the mouse.

I have some experience in K-line drawing, but I don't have enough experience in word processing.
Text drawn with pg.textitem does not scale automatically.

Excuse me: what kind of text drawing scheme should I use?

Dear teacher:
p3

At present, this effect has been achieved and the goal has been preliminarily achieved, but there are still some problems:
The current text position is offset. For example, set the position through textitem.setpos (1,14030). Because the text has a height, the display position is below 14030.

If I want the middle of the text to be displayed at 14030, I need to offset the Y axis of the text.
However, due to market changes, the actual display range of y-axis is not fixed. For example, the maximum and minimum values of some products are 3500-6050, and some products are 12000-18000.

Excuse me?

  1. I want the text display position to be right in the middle of the Y axis. What should I do?

  2. Is there a way to read the maximum and minimum values of the Y axis of pg.graphicslayoutwidget.addplot layer?

  3. How to read: the corresponding height of text under different font sizes of textitem object?