I am working on a visualization application in python right now to visualize data in multiple subplots. One of the things I am doing is in each subplot, plotting vertical lines to indicate when some certain things have happened (it is time variant data).
cProfile, I was able to identify a fairly large portion of my time in each method goes to the
add_shape() method call.
In each of those subplots, I am basically calling the following line:
fig.add_shape( plotly.graph_objects.layout.Shape( type="line", xref="x", yref="y", x0=x0 y0=y0, x1=x1, y1=y1, name=name, line=dict(color=line_color, width=3, dash='dot'), ), row=row, col=col, )
Is anyone aware of a way to speed this up? Thank you in advance!