MCPcopy Create free account
hub / github.com/alpha2phi/python-apps / create_time_series

Function create_time_series

sagemaker-dash/tutorials/app15.py:136–158  ·  view source on GitHub ↗
(dff, axis_type, title)

Source from the content-addressed store, hash-verified

134
135
136def create_time_series(dff, axis_type, title):
137
138 fig = px.scatter(dff, x='Year', y='Value')
139
140 fig.update_traces(mode='lines+markers')
141
142 fig.update_xaxes(showgrid=False)
143
144 fig.update_yaxes(type='linear' if axis_type == 'Linear' else 'log')
145
146 fig.add_annotation(x=0,
147 y=0.85,
148 xanchor='left',
149 yanchor='bottom',
150 xref='paper',
151 yref='paper',
152 showarrow=False,
153 align='left',
154 text=title)
155
156 fig.update_layout(height=225, margin={'l': 20, 'b': 30, 'r': 10, 't': 10})
157
158 return fig
159
160
161@app.callback(dash.dependencies.Output('x-time-series', 'figure'), [

Callers 2

update_y_timeseriesFunction · 0.85
update_x_timeseriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected