Good morning Gang!
I am trying to see what the most performant way to set the height of a plot widget using the function:
from plotly import graphic_objs as go
go.Scatter()
The documentation for this Scatter plot says to use this function as an object constructor and then apply the go.Layout function to change the values as such:
trace1 = go.Scatter(
x=[0, 1, 2, 3, 4, 5, 6, 7, 8],
y=[8, 7, 6, 5, 4, 3, 2, 1, 0]
)
trace2 = go.Scatter(
x=[0, 1, 2, 3, 4, 5, 6, 7, 8],
y=[0, 1, 2, 3, 4, 5, 6, 7, 8]
)
data = [trace1, trace2]
layout = go.Layout(
xaxis=dict(
range=[2, 5]
),
yaxis=dict(
range=[2, 5]
)
)
fig = go.Figure(data=data, layout=layout)
I didn’t want to configure the height of the object if the anvil workstation is already setting up the height of the widget. ( I have it set to the default 196; but it is not coming out to the height that I have it in the editor. ) Maybe the height that I set in the drag and drop workstation is only the maximum height for the widget?