If the element that returns the figure to "figure" does not have the element "figsize", you can try to set the width and the height directly like follows:įigure=px.line(forecast, x='ds', y='yhat', title='Prophet Predictions', height= 700, width= 1500) <- (that worked for me). Inside the element dcc.Graph( ) there is a property called "figure", to show a figure inside that property you have to assigned figure = "something" that something has to be or return a figure, for example:įigure=plot_plotly(prophet, forecast, figsize= (1500, 700)) <- (that worked for me).Īs you may see inside of the element that returns a figure, in my case "plot_ploty", you can set the element or property "figsize" as I did and stablished the height and wide. Keep in mind that you can create a Graph object and set figure later, in a dash callback.įor example, if the value of a dcc.Slider affects the figure attribute of your Graph you will have: import aph_objs as "figure"),įigure = go.Figure(data=data, layout=layout)įirst I have to say that I return the element graph() from Python functions in Dash to the app.layout elements. ,Īccording to the Plotly figure object schema, height must be a number greater than or equal to 10, and its default is 450 (px). Each figure has data and layout attributes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |