Skip to content

Allow plotting multiple data items at once#2461

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
ntjess:multi-plot
Feb 10, 2023
Merged

Allow plotting multiple data items at once#2461
j9ac9k merged 1 commit intopyqtgraph:masterfrom
ntjess:multi-plot

Conversation

@ntjess
Copy link
Copy Markdown
Contributor

@ntjess ntjess commented Oct 3, 2022

Allow easily plotting multiple PlotDataItems at once through a PlotItem.multiDataPlot interface. This way, some properties can be easily cycled for each curve without all the required manual specifications. See the newly added example for some usages.


import pyqtgraph as pg
from pyqtgraph.graphicsItems.ScatterPlotItem import name_list
from pyqtgraph.Qt import QtWidgets, QtCore

Check notice

Code scanning / CodeQL

Unused import

Import of 'QtCore' is not used.
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Oct 4, 2022

Hi @ntjess This LGTM.

On the example, I think we can do a better job showing what the data structure that's being passed in is:

So instead of:

image

first I was thinking repr(x) and repr(y) (instead of xType and yType but the output from that is also a bit tough to read....

got it looking a little better by setting np.set_printoptions(threshold=9) at the top of the example; the text box desperately needs to have a monospaced font (not sure how to do that)

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Feb 10, 2023

Should have merged this a while back, merging now! Thanks for the PR @ntjess

@j9ac9k j9ac9k merged commit dbd8534 into pyqtgraph:master Feb 10, 2023
@ntjess ntjess deleted the multi-plot branch April 11, 2023 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants