Hey everyone,
I am having a question regarding the stream method of a ColumnDataSource. I set up a figure with 10 different lines that get a new value every 10 seconds. The new value is coming in with the stream method. When new values are put into the ColumnDataSource, the plot is changing the y-axis if needed. My issue is, that one of the ten lines has relativly high values. If I set the line to invisible and set the y-axis range to a smaller range, the range jumps back up with the next call of the stream method. In my case, that is a little annoying. Is it possible to somehow stop the plot from changing the y-axis automatically with every call of the stream method? The relevant code parts are following.
Thank you very much.
main.py
dataframe = {'x' : [], 'L1' : [], 'L2' : [], 'L3' : [], 'L4' : [], 'L5' : [], 'L6' : [], 'L7' : [], 'L8' : [], 'L9' : [], 'L10' : []}
sourcePlot = ColumnDataSource(dataframe)
xRange = Range1d(start=datetime.datetime.now() - datetime.timedelta(minutes=15), end=datetime.datetime.now())
plot = figure(name='kwhPlot', x_axis_type='datetime', plot_width=1500, plot_height=500, title="kWh live", x_axis_label='Time', y_axis_label='[kWh]', x_range=xRange, toolbar_location=None)
dataReceiver (is called every 10 seconds with the new data)
newDataframe = {'x' : [date], 'L1' : [y1], 'L2' : [y2], 'L3' : [y3], 'L4' : [y4], 'L5' : [y5], 'L6' : [y6], 'L7' : [y7], 'L8' : [y8], 'L9' : [y9], 'L10' : [y10]}
sourcePlot.stream(newDataframe, 1000)