streamz icon indicating copy to clipboard operation
streamz copied to clipboard

stream visualization with x axis

Open 0rangeMan opened this issue 7 years ago • 2 comments

Hi, I have tried out a bit with the stream visualization using Random, it is a very cool feature. With some tweaks, I think I will be able to plot some data frame created based on my own generator (haven't tried it out yet, but should be pretty easy using next(gen) to pipe the data to the frame)

The only thing is, the x axis is somehow not related to the generator itself. What would be really nice is to be able to use one of the columns in the generator as the x axis for plotting. Any idea how to do this?

Simple example: suppose I have a stream of tuples (ts, value), I want to use ts as the x axis, and value as the y asix for plotting. (ts, value) (1, 100) (2, 200) (3, 300) ...

0rangeMan avatar Apr 04 '18 19:04 0rangeMan

Sounds like you might want to gather your rows into a dataframe and plot that?

martindurant avatar Apr 04 '18 21:04 martindurant

Yes, that's the idea. What I did so far is very similar to Random but with the different generator function (i.e. _random_df).

Generally speaking, it would be nice to be able to define any numerical dataframe and plot it.

0rangeMan avatar Apr 05 '18 07:04 0rangeMan