I'm making a time series monitoring program.

I'd like to change the color of a plot starting at half the range of the x-axis.
For a 100 x 20 plot widget I would like to change last 50 data points to another color.
How can I draw a custom vertical grid whenever every xx items of data are passed?
For (1), you will have to break your data into two separate lines, and assign the colors individually. PyQtGraph does not yet support multiple colors per line.
For (2), consider using pg.InfiniteLine or pg.VTickGroup.
How can I obtain a pyqtgraph plotwidget with variable colors and grids depending on the data?