# Get this figure: fig = py.get_figure("https://plotly.com/~cbrandon/7/") # Get this figure's data: data = py.get_figure("https://plotly.com/~cbrandon/7/").get_data() # Add data to this figure: py.plot(Data([Scatter(x=[1, 2], y=[2, 3])]), filename ="Vermont Lunar CubeSat orbit", fileopt="extend") # Get y data of first trace: y1 = py.get_figure("https://plotly.com/~cbrandon/7/").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 = { "line": }, "name": "Inclination", "type": "scatter", "x": [108.0, 114.0, 241.0, 299.0, 308.0, 409.0, 432.0, 462.0, 777.0, 869.0, 922.0, 923.0, 920.0, 920.0, 920.0, 1087.0, 1087.0, 1166.0, 1233.0, 1233.0, 1497.0, 1562.0, 1661.0, 1775.0, 1963.0, 1963.0, 2091.0, 2235.0, 2370.0, 2415.0, 2417.0, 2578.0, 2795.0, 2963.0, 3153.0, 3322.0, 3555.0, 3714.0, 3903.0, 4079.0, 4318.0, 4630.0, 4812.0], "y": [40.5172, 40.5114, 40.519400000000005, 40.5174, 40.5189, 40.519800000000004, 40.5186, 40.518100000000004, 40.519600000000004, 40.5187, 40.5199, 40.5182, 40.516600000000004, 40.516600000000004, 40.516600000000004, 40.5206, 40.5206, 40.519000000000005, 40.5197, 40.5197, 40.5165, 40.5163, 40.514500000000005, 40.519000000000005, 40.517, 40.517, 40.5105, 40.5075, 40.5142, 40.507400000000004, 40.506800000000005, 40.516600000000004, 40.5161, 40.5159, 40.5159, 40.5158, 40.5165, 40.5168, 40.5169, 40.5173, 40.517500000000005, 40.518, 40.5186], "xbins": }, "yaxis": "y2", "marker": {"line": }}, "error_y": }, "textfont": } } trace2 = { "line": }, "name": "Eccentr.", "type": "scatter", "x": [108.0, 114.0, 241.0, 299.0, 308.0, 409.0, 432.0, 462.0, 777.0, 869.0, 922.0, 923.0, 920.0, 920.0, 920.0, 1087.0, 1087.0, 1166.0, 1233.0, 1233.0, 1497.0, 1562.0, 1661.0, 1775.0, 1963.0, 1963.0, 2091.0, 2235.0, 2370.0, 2415.0, 2417.0, 2578.0, 2795.0, 2963.0, 3153.0, 3322.0, 3555.0, 3714.0, 3903.0, 4079.0, 4318.0, 4630.0, 4812.0], "y": [6035.0, 5162.0, 5877.0, 6397.0, 6112.0, 6051.0, 6195.0, 6073.0, 6056.0, 5349.0, 5267.0, 5612.0, 5323.0, 5323.0, 5323.0, 5237.0, 5237.0, 5517.0, 4593.0, 4593.0, 5226.0, 4327.0, 3506.0, 4833.0, 4527.0, 4527.0, 2598.0, 2462.0, 3438.0, 2817.0, 2487.0, 3644.0, 3218.0, 3007.0, 2934.0, 2985.0, 2967.0, 3004.0, 3037.0, 3130.0, 3366.0, 3707.0, 3924.0], "xbins": }, "marker": {"line": }}, "error_y": }, "textfont": } } trace3 = { "line": }, "name": "M Motion", "type": "scatter", "x": [108.0, 114.0, 241.0, 299.0, 308.0, 409.0, 432.0, 462.0, 777.0, 869.0, 922.0, 923.0, 920.0, 920.0, 920.0, 1087.0, 1087.0, 1166.0, 1233.0, 1233.0, 1497.0, 1562.0, 1661.0, 1775.0, 1963.0, 1963.0, 2091.0, 2235.0, 2370.0, 2415.0, 2417.0, 2578.0, 2795.0, 2963.0, 3153.0, 3322.0, 3555.0, 3714.0, 3903.0, 4079.0, 4318.0, 4630.0, 4812.0], "y": [15.21012737, 15.21036615, 15.21109505, 15.21097009, 15.21113058, 15.21127139, 15.21133141, 15.211344760000001, 15.211971870000001, 15.21212188, 15.2121475, 15.21221282, 15.21217141, 15.21217141, 15.21217141, 15.21236756, 15.21236756, 15.21248494, 15.21248898, 15.21248898, 15.21270573, 15.21279416, 15.212773160000001, 15.21316468, 15.21319895, 15.21319895, 15.21346638, 15.21355108, 15.21366688, 15.21388864, 15.213884890000001, 15.20964887, 15.20980078, 15.209936560000001, 15.21012142, 15.21027329, 15.210460020000001, 15.210612900000001, 15.21081767, 15.211006040000001, 15.21123837, 15.2115199, 15.21167118], "xbins": }, "yaxis": "y3", "marker": {"line": }}, "error_y": }, "textfont": } } data = Data([trace1, trace2, trace3]) layout = { "font": { "size": 12, "color": "#000", "family": "'Open sans', verdana, arial, sans-serif" }, "title": "Vermont Lunar CubeSat", "width": 1344, "xaxis": { "type": "linear", "dtick": 500, "range": [108, 4812], "tick0": 0, "ticks": "outside", "title": "Revolutions since November 19, 2013, 8:15pm EST Launch", "anchor": "y", "domain": [0.1, 1], "mirror": "all", "nticks": 0, "ticklen": 5, "autotick": True, "position": 0, "showgrid": True, "showline": True, "tickfont": { "size": 0, "color": "rgb(0, 0, 255)", "family": "" }, "zeroline": True, "autorange": True, "gridcolor": "#ddd", "gridwidth": 1, "linecolor": "#000", "linewidth": 1, "rangemode": "normal", "tickangle": "auto", "tickcolor": "#000", "tickwidth": 1, "titlefont": { "size": 0, "color": "rgb(0, 0, 255)", "family": "" }, "overlaying": False, "showexponent": "all", "zerolinecolor": "#000", "zerolinewidth": 1, "exponentformat": "e", "showticklabels": True }, "yaxis": { "type": "linear", "dtick": 500, "range": [2243.3888888888887, 6615.611111111111], "tick0": 0, "ticks": "outside", "title": "Eccentricity x 10^-7", "anchor": "x", "domain": [0, 1], "mirror": "all", "nticks": 0, "ticklen": 5, "autotick": True, "position": 0, "showgrid": True, "showline": True, "tickfont": { "size": 0, "color": "rgb(255, 127, 14)", "family": "" }, "zeroline": True, "autorange": True, "gridcolor": "#ddd", "gridwidth": 1, "linecolor": "#000", "linewidth": 1, "rangemode": "normal", "tickangle": "auto", "tickcolor": "#000", "tickwidth": 1, "titlefont": { "size": 0, "color": "rgb(255, 127, 14)", "family": "" }, "overlaying": False, "showexponent": "all", "zerolinecolor": "#000", "zerolinewidth": 1, "exponentformat": "e", "showticklabels": True }, "bargap": 0.2, "boxgap": 0.3, "height": 565, "legend": { "x": 0.98, "y": 0.98, "font": { "size": 0, "color": "", "family": "" }, "bgcolor": "#fff", "traceorder": "normal", "bordercolor": "#000", "borderwidth": 1 }, "margin": { "b": 80, "l": 80, "r": 80, "t": 100, "pad": 2 }, "yaxis2": { "side": "right", "type": "linear", "dtick": 0.002, "range": [40.50603333333334, 40.521366666666665], "tick0": 0, "ticks": "outside", "title": "Inclination (degrees)", "anchor": "x", "domain": [0, 1], "mirror": "all", "nticks": 0, "ticklen": 5, "autotick": True, "position": 0, "showgrid": True, "showline": True, "tickfont": { "size": 0, "color": "rgb(31, 119, 180)", "family": "" }, "zeroline": True, "autorange": True, "gridcolor": "#ddd", "gridwidth": 1, "linecolor": "#000", "linewidth": 1, "rangemode": "normal", "tickangle": "auto", "tickcolor": "#000", "tickwidth": 1, "titlefont": { "size": 0, "color": "rgb(31, 119, 180)", "family": "" }, "overlaying": "y", "showexponent": "all", "zerolinecolor": "#000", "zerolinewidth": 1, "exponentformat": "e", "showticklabels": True }, "yaxis3": { "side": "left", "type": "linear", "dtick": 0.0005, "range": [15.209413327222222, 15.214124182777779], "tick0": 0, "ticks": "outside", "title": "Mean Montion (revolutions/day)", "anchor": "free", "domain": [0, 1], "mirror": "all", "nticks": 0, "ticklen": 5, "autotick": True, "position": 0, "showgrid": True, "showline": True, "tickfont": { "size": 0, "color": "rgb(44, 160, 44)", "family": "" }, "zeroline": True, "autorange": True, "gridcolor": "#ddd", "gridwidth": 1, "linecolor": "#000", "linewidth": 1, "rangemode": "normal", "tickangle": "auto", "tickcolor": "#000", "tickwidth": 1, "titlefont": { "size": 0, "color": "rgb(44, 160, 44)", "family": "" }, "overlaying": "y", "showexponent": "all", "zerolinecolor": "#000", "zerolinewidth": 1, "exponentformat": "e", "showticklabels": True }, "barmode": "stack", "boxmode": "overlay", "autosize": True, "dragmode": "zoom", "hovermode": "x", "titlefont": { "size": 0, "color": "rgb(0, 0, 255)", "family": "" }, "separators": ".,", "showlegend": True, "bargroupgap": 0, "boxgroupgap": 0.3, "plot_bgcolor": "#fff", "paper_bgcolor": "#fff" } fig = Figure(data=data, layout=layout) plot_url = py.plot(fig)