# Get this figure: fig = py.get_figure("https://chart-studio.plotly.com/~etpinard/2080/") # Get this figure's data: data = py.get_figure("https://chart-studio.plotly.com/~etpinard/2080/").get_data() # Add data to this figure: py.plot(Data([Scatter(x=[1, 2], y=[2, 3])]), filename ="Grouped bars suplots", fileopt="extend") # Get y data of first trace: y1 = py.get_figure("https://chart-studio.plotly.com/~etpinard/2080/").get_data()[0]["y"] # Get figure documentation: https://chart-studio.plotly.com/python/get-requests/ # Add data documentation: https://chart-studio.plotly.com/python/file-options/ # If you're using unicode in your file, you may need to specify the encoding. # You can reproduce this figure in Python with the following code! # Learn about API authentication here: https://chart-studio.plotly.com/python/getting-started # Find your api_key here: https://chart-studio.plotly.com/settings/api import plotly.plotly as py from plotly.graph_objs import * py.sign_in('username', 'api_key') trace1 = { "uid": "84a69b", "type": "bar", "x": [1, 2, 3], "y": [2, 1, 2], "marker": {"color": "blue"} } trace2 = { "uid": "7db76e", "type": "bar", "x": [1, 2, 3], "y": [1, 2, 1], "marker": {"color": "red"} } trace3 = { "uid": "ef4517", "type": "bar", "x": [1, 2, 3], "y": [1, 2, 1], "xaxis": "x2", "yaxis": "y2", "marker": {"color": "red"} } trace4 = { "uid": "be8f81", "type": "bar", "x": [1, 2, 3], "y": [2, 1, 2], "xaxis": "x2", "yaxis": "y2", "marker": {"color": "blue"} } data = Data([trace1, trace2, trace3, trace4]) layout = { "title": "Grouped bars on multiple axes", "width": 1080, "xaxis": { "type": "linear", "range": [0.5, 3.5], "domain": [0, 0.5], "autorange": True }, "yaxis": { "type": "linear", "range": [0, 2.1052631578947367], "domain": [0, 0.5], "autorange": True }, "height": 598, "xaxis2": { "type": "linear", "range": [0.5, 3.5], "anchor": "y2", "domain": [0.5, 1], "autorange": True }, "yaxis2": { "type": "linear", "range": [0, 2.1052631578947367], "anchor": "x2", "domain": [0.5, 1], "autorange": True }, "barmode": "group", "autosize": True, "showlegend": True } fig = Figure(data=data, layout=layout) plot_url = py.plot(fig)