how can i enhance the speed of drawing massive data graph by QGraphicsViewFrame
Hello, everyone!
i use qGraphicsView Frame to draw graph. And I draw my graph on a class which inherit from QGraphicsItem. but when i use massive volume of data,(such as more than 100,000 points),then the speed of the drawing graph is so slowly without anyone's tolerance.
How can i enhance the speed of drawing points ? if i draw graph on the item class which inherit from QGraphicsPixmapItem, does this will help me to speed up drawing points?
or any other useful advice ?
wish your reply !
Thank you very much!
Re: how can i enhance the speed of drawing massive data graph by QGraphicsViewFrame
What does the graph look like? Is it composed only from points? If so, I would advise to make each point a separate item or cluster points and use a smaller (but still larger than 1) items to display the points. The speed of graphics view comes also from the fact that it doesn't draw items that are not visible but as you have only one item, it has to draw 100k points all the time and there is no benefit in using graphics view at all. You might have used plan QWidget+QPainter combination with better results in such case.
Re: how can i enhance the speed of drawing massive data graph by QGraphicsViewFrame
Quote:
Originally Posted by
wysota
What does the graph look like? Is it composed only from points? If so, I would advise to make each point a separate item or cluster points and use a smaller (but still larger than 1) items to display the points. The speed of graphics view comes also from the fact that it doesn't draw items that are not visible but as you have only one item, it has to draw 100k points all the time and there is no benefit in using graphics view at all. You might have used plan QWidget+QPainter combination with better results in such case.
Thank you for your advice. but i think this is not compatible for my graph. Because my graph is drawed by cluster points of 2D data, and the graph can be manipulated, such as line the points, and set color map and so on! then how can i enhance drawing speed throug qgraphicsItem??
here is another problem , i need to show two or more graphs (which is drawn by different 2D data points) in a cordinate system. and is required they can be manipulated
separately.(here all the graph item's bounding rect are of the same size ,and they all put in the same cordinate item ) ! my thought is draw different 2d data points in different qgraphicsItem, but i found that there only show the first graph of the first 2d data , other items can't be seen. this means that other graph items is enveloped by the other.
how can i resolve this problem? Thank you!
Wish your reply soon!
Re: how can i enhance the speed of drawing massive data graph by QGraphicsViewFrame
Quote:
Originally Posted by
christina123y
but i think this is not compatible for my graph.
What is not compatible with your graph? :confused:
Re: how can i enhance the speed of drawing massive data graph by QGraphicsViewFrame
Quote:
Originally Posted by
wysota
What is not compatible with your graph? :confused:
I mean the way you adviced(which draw every point as an item ) may not available to my need.
now i have tried to draw points on an image,then put the image on the QGraphicsPixmapItem.
And, how can i resolve the other problem as i put forward ? thank you very much
Re: how can i enhance the speed of drawing massive data graph by QGraphicsViewFrame
Quote:
Originally Posted by
christina123y
I mean the way you adviced(which draw every point as an item ) may not available to my need.
Why not?
Quote:
And, how can i resolve the other problem as i put forward ? thank you very much
I'm not sure what you wanted there so it's hard to answer. My first guess would be that you need two scenes and two views.