Spaces:
Sleeping
Sleeping
File size: 742 Bytes
012df4b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | from plotly.subplots import make_subplots
import plotly.graph_objects as go
def line_plot(x, y, title):
fig = make_subplots(rows = 1, cols = 1, shared_xaxes = True, vertical_spacing = 0.02)
fig.add_trace(go.Scatter(x = x, y = y,
name = "Retorno acumulado", line = dict(color = "green")), row = 1, col = 1)
fig. update_layout(height = 600, width = 1000,
title_text = title,
title_font_color = "black",
xaxis_title = "Data",
yaxis_title = "Retorno acumulado (%)",
legend_title = "Retorno acumulado",
font = dict(size = 10, color = "black"))
return fig |