##
## Python program will run on selection.
##
import numpy as np
import plotly
from plotly.graph_objs import Scatter, Layout, Figure, Heatmap
mma = 0
mmS = 0
mmA = GC.activityMeanmax()
mmS = GC.seasonMeanmax()
yyA = np.asarray(mmA["power"])
yyA[0] = yyA[1]
xxA = [s/60 for s in range(1, len(yyA)+1)]
yyS = np.asarray(mmS["power"])
xxS = [s/60 for s in range(1, len(yyS)+1)]
yyS[0] = yyS[1]
plotOutFile = "D:/tmp/GC_activities_plot_temp.html"
traceA = Scatter(x=xxA, y=yyA, mode='lines')
traceS = Scatter(x=xxS, y=yyS, mode='lines')
data = [traceA, traceS]
layout = dict(title="CP Activity vs. CP Season", xaxis = dict(title="Duration (min)", type='log'), yaxis = dict(title="Power"))
fig = dict(data=data, layout=layout)
plotly.offline.plot(fig, filename=plotOutFile, auto_open = False)
print(max(yyA))
print(max(yyS))
GC.webpage(plotOutFile)
seasonMeanmax uses the selected Date Range in Trends sidebar, unless all=True is requested
Seem like just a like piece of information was missing to me.
I will trythis.
Best, Stefan