# Get this figure: fig = py.get_figure("https://plotly.com/~chelsea_lyn/8796/") # Get this figure's data: data = py.get_figure("https://plotly.com/~chelsea_lyn/8796/").get_data() # Add data to this figure: py.plot(Data([Scatter(x=[1, 2], y=[2, 3])]), filename ="solar_system_planet_temp", fileopt="extend") # Get y data of first trace: y1 = py.get_figure("https://plotly.com/~chelsea_lyn/8796/").get_data()[0]["y"] # Get figure documentation: https://plotly.com/python/get-requests/ # Add data documentation: https://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://plotly.com/python/getting-started # Find your api_key here: https://plotly.com/settings/api import plotly.plotly as py from plotly.graph_objs import * py.sign_in('username', 'api_key') trace1 = { "mode": "markers", "type": "scatter3d", "x": [57.9, 108.2, 149.6, 227.9, 778.6, 1433.5, 2872.5, 4495.1, 5906.4], "y": [5427, 5243, 5514, 3933, 1326, 687, 1271, 1638, 2095], "z": [3.7, 8.9, 9.8, 3.7, 23.1, 9.0, 8.7, 11.0, 0.7], "marker": { "sizeref": 750, "size": [4879, 12104, 12756, 6792, 142984, 120536, 51118, 49528, 2370], "colorbar": {"title": "Mean
Temperature"}, "color": [167, 464, 15, -20, -65, -110, -140, -195, -200, -225], "sizemode": "diameter", "colorscale": [ [0, "rgb(5, 10, 172)"], [0.3, "rgb(255, 255, 255)"], [1, "rgb(178, 10, 28)] }, "text": ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto"] } data = Data([trace1]) layout = { "scene": { "xaxis": { "title": "Distance from Sun", "titlefont": {"color": "Orange"} }, "yaxis": { "title": "Density", "titlefont": {"color": "rgb(220, 220, 220)"} }, "zaxis": { "title": "Gravity", "titlefont": {"color": "rgb(220, 220, 220)"} }, "bgcolor": "rgb(20, 24, 54)" }, "title": "Planets!!", "width": 800, "height": 800 } fig = Figure(data=data, layout=layout) plot_url = py.plot(fig)