# Get this figure: fig = py.get_figure("https://plotly.com/~jeremiah.feldstein/72/") # Get this figure's data: data = py.get_figure("https://plotly.com/~jeremiah.feldstein/72/").get_data() # Add data to this figure: py.plot(Data([Scatter(x=[1, 2], y=[2, 3])]), filename ="Micro-Bead Sizes In Personal Care Products", fileopt="extend") # Get y data of first trace: y1 = py.get_figure("https://plotly.com/~jeremiah.feldstein/72/").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 = { "uid": "12d6ed", "fill": "none", "line": { "color": "rgb(0, 67, 88)", "width": 1 }, "mode": "markers", "name": "Garnier Fructis", "type": "scatter", "x": [".489", ".479", ".360", ".405", ".511", ".434", ".493", ".420", ".445", ".411", ".475", ".442", ".452", ".382", ".441", ".424", ".427", ".422", ".497", ".423", ".450", ".343", ".446", ".457", ".409", ".470", ".461", ".440"], "y": [".492", ".506", ".388", ".447", ".520", ".427", ".486", ".402", ".430", ".389", ".476", ".423", ".521", ".390", ".426", ".465", ".428", ".410", ".432", ".451", ".438", ".381", ".451", ".453", ".404", ".441", ".492", ".416"], "marker": { "line": { "color": "#444", "width": 0 }, "size": 6, "color": "#1f77b4", "symbol": "circle", "opacity": 1, "maxdisplayed": 0 }, "error_x": { "visible": False, "copy_ystyle": True }, "error_y": { "color": "rgb(0, 67, 88)", "width": 1, "visible": False, "thickness": 1 }, "opacity": 1 } trace2 = { "uid": "8444b7", "fill": "none", "line": { "color": "rgb(31, 138, 112)", "width": 1 }, "mode": "markers", "name": "Clean & Clear", "type": "scatter", "x": [".740", ".733", ".836", ".849", ".839", ".809", ".737", ".803", ".720", ".759", ".930", ".884", ".833", ".909", ".801", ".787", ".766", ".787", ".775", ".762", ".804", ".799", ".815", ".839", ".651", ".785", ".837", ".805"], "y": [".711", ".736", ".924", ".735", ".867", ".796", ".716", ".742", ".780", ".753", ".902", ".888", ".759", ".931", ".717", ".791", ".781", ".726", ".827", ".635", ".819", ".745", ".787", ".784", ".720", ".766", ".832", ".802"], "marker": { "line": { "color": "#444", "width": 0 }, "size": 6, "color": "#ff7f0e", "symbol": "circle", "opacity": 1, "maxdisplayed": 0 }, "error_x": { "visible": False, "copy_ystyle": True }, "error_y": { "color": "rgb(31, 138, 112)", "width": 1, "visible": False, "thickness": 1 }, "opacity": 1 } trace3 = { "uid": "ed8010", "fill": "none", "line": { "color": "rgb(190, 219, 57)", "width": 1 }, "mode": "markers", "name": "Soft Soap", "type": "scatter", "x": [".236", ".378", ".342", ".393", ".343", ".274", ".341", ".336", ".251", ".268", ".387", ".421", ".301", ".321", ".257", ".327", ".231", ".362", ".223", ".398", ".286", ".443", ".258", ".324", ".333", ".359", ".329", ".329", ".319", ".278", ".158", ".244", ".250", ".242", ".316", ".289", ".333", ".264", ".242", ".318"], "y": [".337", ".257", ".491", ".305", ".301", ".274", ".201", ".354", ".448", ".342", ".273", ".334", ".257", ".296", ".330", ".420", ".342", ".312", ".229", ".339", ".296", ".333", ".154", ".280", ".347", ".285", ".301", ".283", ".170", ".407", ".181", ".240", ".263", ".278", ".347", ".420", ".334", ".396", ".274", ".306"], "marker": { "line": { "color": "#444", "width": 0 }, "size": 6, "color": "#2ca02c", "symbol": "circle", "opacity": 1, "maxdisplayed": 0 }, "error_x": { "visible": False, "copy_ystyle": True }, "error_y": { "color": "rgb(190, 219, 57)", "width": 1, "visible": False, "thickness": 1 }, "opacity": 1 } trace4 = { "uid": "1cc738", "fill": "none", "line": { "color": "rgb(255, 225, 26)", "width": 1 }, "mode": "markers", "name": "Crest", "type": "scatter", "x": ["", ".217", ".192", ".270", ".912", ".270", ".228", ".137", ".257", ".172", ".179", ".309", ".152", ".089", ".096", ".127", ".116", ".415", ".273", ".112", ".292", ".089", ".047", ".019", ".019", ".013", ".105", ".024", ".090", ".061", ".0047", ".041", ".028", ".206", ".151", ".017", ".011", ".343", ".05", ".215", ".221", ".162", ".108", ".058", ".48", ".012", ".20", ".568", ".171", ".085", ".381", ".19", ".206"], "y": ["", ".882", ".487", ".596", ".487", ".596", ".129", ".153", ".184", ".364", ".268", ".125", ".156", ".191", ".062", ".193", ".141", ".214", ".363", ".121", ".261", ".083", ".021", ".022", ".013", ".014", ".087", ".015", ".08", ".096", ".007", ".067", ".016", ".213", ".298", ".017", ".015", ".268", ".16", ".342", ".406", ".275", ".676", ".033", ".16", ".015", ".12", ".204", ".088", ".042", ".234", ".50", ".615"], "marker": { "line": { "color": "#444", "width": 0 }, "size": 6, "color": "#d62728", "symbol": "circle", "opacity": 1, "maxdisplayed": 0 }, "error_x": { "visible": False, "copy_ystyle": True }, "error_y": { "color": "rgb(255, 225, 26)", "width": 1, "visible": False, "thickness": 1 }, "opacity": 1 } trace5 = { "uid": "1db7cd", "fill": "none", "line": { "color": "rgb(253, 116, 0)", "width": 1 }, "mode": "markers", "name": "Dove", "type": "scatter", "x": ["", ".165", ".112", ".181", ".131", ".128", ".020", ".08", ".169", ".132", ".057", ".138", ".079", ".191", ".083", ".228", ".035", ".196", ".154", ".067", ".172", ".200", ".063", ".205", ".080", ".072", ".060", ".179", ".114", ".229", ".141", ".076", ".184", ".185", ".140", ".20", ".108", ".062", ".142", ".044", ".056", ".276", ".176", ".168", ".496", ".476", ".753", ".523", ".586", ".566", ".811", ".434", ".796", ".575", ".710", ".545"], "y": ["", ".225", ".108", ".201", ".123", ".131", ".020", ".050", ".149", ".207", ".078", ".167", ".079", ".178", ".088", ".240", ".038", ".271", ".146", ".079", ".165", ".260", ".073", ".221", ".080", ".061", ".080", ".167", ".12", ".266", ".131", ".153", ".19", ".18", ".124", ".177", ".119", ".093", ".135", ".045", ".111", ".235", ".143", ".114", ".495", ".49", ".812", ".489", ".594", ".545", ".809", ".43", ".848", ".582", ".754", ".495"], "marker": { "line": { "color": "#444", "width": 0 }, "size": 6, "color": "#9467bd", "symbol": "circle", "opacity": 1, "maxdisplayed": 0 }, "error_x": { "visible": False, "copy_ystyle": True }, "error_y": { "color": "rgb(253, 116, 0)", "width": 1, "visible": False, "thickness": 1 }, "opacity": 1 } trace6 = { "uid": "0d7921", "fill": "none", "line": { "color": "rgb(166, 28, 0)", "width": 1 }, "mode": "markers", "name": "St. Ives", "type": "scatter", "x": ["", ".291", ".146", ".210", ".300", ".232", ".289", ".309", ".225", ".256", ".418", ".394", ".309", ".441", ".280", ".295", ".221", ".371", ".289", ".272", ".260", ".300", ".243", ".328", ".508", ".240"], "y": ["", ".673", ".297", ".280", ".228", ".293", ".222", ".209", ".426", ".324", ".286", ".191", ".352", ".229", ".265", ".197", ".279", ".251", ".295", ".252", ".644", ".306", ".441", ".310", ".305", ".340"], "marker": { "line": { "color": "#444", "width": 0 }, "size": 6, "color": "#8c564b", "symbol": "circle", "opacity": 1, "maxdisplayed": 0 }, "error_x": { "visible": False, "copy_ystyle": True }, "error_y": { "color": "rgb(166, 28, 0)", "width": 1, "visible": False, "thickness": 1 }, "opacity": 1 } trace7 = { "uid": "1225b0", "fill": "none", "line": { "color": "rgb(0, 67, 88)", "width": 1 }, "mode": "markers", "name": "Neutrogena", "type": "scatter", "x": ["", ".221", ".161", ".237", ".194", ".319", ".375", ".172", ".138", ".093", ".260", ".225", ".287", ".243", ".280", ".132", ".254", ".223", ".145", ".308", ".152", ".197", ".131", ".165", ".241", ".068", ".097"], "y": ["", ".236", ".213", ".308", ".383", ".314", ".359", ".210", ".221", ".110", ".270", ".287", ".202", ".247", ".293", ".202", ".255", ".175", ".278", ".234", ".167", ".267", ".155", ".167", ".254", ".067", ".082"], "marker": { "line": { "color": "#444", "width": 0 }, "size": 6, "color": "#e377c2", "symbol": "circle", "opacity": 1, "maxdisplayed": 0 }, "error_x": { "visible": False, "copy_ystyle": True }, "error_y": { "color": "rgb(0, 67, 88)", "width": 1, "visible": False, "thickness": 1 }, "opacity": 1 } data = Data([trace1, trace2, trace3, trace4, trace5, trace6, trace7]) layout = { "font": { "size": 24, "color": "#444", "family": "Arial, sans-serif" }, "title": "Micro-Bead Sizes In Personal Care Products", "width": 1379, "xaxis": { "type": "linear", "dtick": 1, "range": [-0.05426519607843137, 0.9889651960784314], "tick0": 0, "ticks": "", "title": "Length (mm)", "nticks": 0, "showgrid": True, "showline": False, "tickfont": { "size": 24, "color": "#444", "family": "Arial, sans-serif" }, "tickmode": "auto", "zeroline": True, "autorange": True, "gridcolor": "#eee", "gridwidth": 1, "rangemode": "normal", "tickangle": "auto", "titlefont": { "size": 24, "color": "#444", "family": "Arial, sans-serif" }, "showexponent": "all", "zerolinecolor": "#444", "zerolinewidth": 1, "exponentformat": "B", "showticklabels": True }, "yaxis": { "type": "linear", "dtick": 1, "range": [-0.052776315789473685, 0.9907763157894738], "tick0": 0, "ticks": "", "title": "Width (mm)", "nticks": 0, "showgrid": True, "showline": False, "tickfont": { "size": 24, "color": "#444", "family": "Arial, sans-serif" }, "tickmode": "auto", "zeroline": True, "autorange": True, "gridcolor": "#eee", "gridwidth": 1, "rangemode": "normal", "tickangle": "auto", "titlefont": { "size": 24, "color": "#444", "family": "Arial, sans-serif" }, "showexponent": "all", "zerolinecolor": "#444", "zerolinewidth": 1, "exponentformat": "B", "showticklabels": True }, "height": 695, "legend": { "x": 1.21875, "y": 0.966990291262136, "font": { "size": 24, "color": "#444", "family": "Arial, sans-serif" }, "bgcolor": "#fff", "xanchor": "auto", "traceorder": "normal", "bordercolor": "#444", "borderwidth": 0 }, "autosize": True, "dragmode": "pan", "hovermode": "x", "titlefont": { "size": 24, "color": "#444", "family": "Arial, sans-serif" }, "separators": ".,", "showlegend": True, "hidesources": False, "plot_bgcolor": "#fff", "paper_bgcolor": "#fff" } fig = Figure(data=data, layout=layout) plot_url = py.plot(fig)