# Get this figure: fig = py.get_figure("https://plotly.com/~Dreamshot/1677/") # Get this figure's data: data = py.get_figure("https://plotly.com/~Dreamshot/1677/").get_data() # Add data to this figure: py.plot(Data([Scatter(x=[1, 2], y=[2, 3])]), filename ="Reputations of the Most Visible Companies, 2015", fileopt="extend") # Get y data of first trace: y1 = py.get_figure("https://plotly.com/~Dreamshot/1677/").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": "fc0a12", "name": "Col2", "type": "bar", "x": ["Wegmans", "Amazon", "Samsung", "Costco", "Johnson & Johnson", "Kraft Foods", "L.L. Bean", "Publix", "Apple", "Google", "Berkshire Hathaway", "The Walt Disney Company", "Sony", "CVS Health", "Microsoft", "Lowe's", "Kellogg Company", "Chick-fil-A", "The Boeing Company", "Intel", "Whole Foods Market", "USAA", "LG", "Proctor & Gamble", "Nike", "Unilever", "Whirlpool", "General Mills", "Honda", "Nestle", "Starbucks", "Kroger", "Wendy's", "Coca-Cola", "Fidelity", "PepsiCo", "FedEx", "The Home Depot", "Meijer's", "IBM", "Hewlett-Packard", "Kohl's", "eBay", "Aldi", "General Electric", "Southwest Airlines", "Nordstrom", "Ford", "Toyota", "Progressive", "State Farm", "Macy's", "DuPont", "Walgreens", "American Express", "YUM! Brands", "Nissan", "Hobby Lobby", "Best Buy", "Dell", "JCPenney", "Allstate", "Target", "Hyundai", "21st Century Fox", "Verizon", "Safeway", "Blue Cross Blue Shield", "USPS", "Royal Dutch Shell", "McDonald's", "Sprint", "Altria", "Wells Fargo", "T-Mobile", "AT&T", "Facebook", "Chevron", "Delta", "Burger King", "Chrysler", "ExxonMobil", "DirecTV", "Walmart", "Time Warner", "United Airlines", "JPMorgan Chase", "General Motors", "Citigroup", "BP", "Bank of America", "Charter Communications", "Comcast", "Koch Industries", "Sears", "Halliburton", "Monsanto", "Dish Network", "AIG", "Goldman Sachs"], "y": ["84.36", "83.72", "81.98", "81.69", "80.88", "80.83", "80.78", "80.73", "80.69", "80.44", "80.28", "80.04", "79.93", "79.83", "79.74", "79.48", "79.25", "78.96", "78.93", "78.54", "78.47", "78.22", "78.20", "78.08", "77.88", "77.80", "77.54", "76.88", "76.80", "76.45", "76.32", "76.29", "75.94", "75.89", "75.69", "75.59", "75.53", "75.38", "75.37", "75.32", "75.26", "75.17", "75.14", "74.78", "74.77", "74.76", "74.46", "74.32", "74.01", "73.79", "73.61", "73.16", "73.09", "72.80", "72.63", "72.60", "72.60", "72.51", "72.28", "72.13", "71.61", "71.03", "70.99", "70.97", "70.14", "69.74", "69.70", "69.50", "69.49", "68.92", "67.77", "67.66", "67.65", "67.55", "67.54", "67.26", "67.17", "67.09", "66.52", "66.23", "65.76", "65.43", "65.27", "65.05", "64.93", "64.91", "63.98", "63.89", "62.19", "62.01", "60.73", "60.30", "60.04", "59.89", "59.79", "59.63", "59.18", "58.07", "55.23", "55.07"], "marker": { "line": {"width": 0.5}, "color": "rgba(159, 197, 232, 0.4)" }, "autobinx": True, "autobiny": True } data = Data([trace1]) layout = { "font": {"family": "Balto, sans-serif"}, "title": "
The Reputations of the 100 Most Visible Companies Among the General Public", "width": 900, "xaxis": { "type": "category", "dtick": 1, "range": [-0.5, 99.5], "ticks": "outside", "title": "


Source: Harris Poll", "nticks": 50, "ticklen": 2, "autotick": False, "tickfont": {"size": 9}, "autorange": True }, "yaxis": { "type": "linear", "range": [0, 88.8], "title": "Reputation Quotient", "nticks": 0, "showgrid": False, "zeroline": False, "autorange": True }, "bargap": 0.4, "height": 600, "margin": {"b": 140}, "autosize": False, "showlegend": False, "plot_bgcolor": "rgba(217, 217, 217, 0.2)" } fig = Figure(data=data, layout=layout) plot_url = py.plot(fig)