# Get this figure: fig = py.get_figure("https://plotly.com/~krmarko/86/") # Get this figure's data: data = py.get_figure("https://plotly.com/~krmarko/86/").get_data() # Add data to this figure: py.plot(Data([Scatter(x=[1, 2], y=[2, 3])]), filename ="Apple Product Mix", fileopt="extend") # Get y data of first trace: y1 = py.get_figure("https://plotly.com/~krmarko/86/").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": "e6188e", "fill": "tonexty", "mode": "lines", "name": "iPhone", "type": "bar", "x": ["1998-12-31", "1999-03-31", "1999-06-30", "1999-09-30", "1999-12-31", "2000-03-31", "2000-06-30", "2000-09-30", "2000-12-31", "2001-03-31", "2001-06-30", "2001-09-30", "2001-12-31", "2002-03-31", "2002-06-30", "2002-09-30", "2002-12-31", "2003-03-31", "2003-06-30", "2003-09-30", "2003-12-31", "2004-03-31", "2004-06-30", "2004-09-30", "2004-12-31", "2005-03-31", "2005-06-30", "2005-09-30", "2005-12-31", "2006-03-31", "2006-06-30", "2006-09-30", "2006-12-31", "2007-03-31", "2007-06-30", "2007-09-30", "2007-12-31", "2008-03-31", "2008-06-30", "2008-09-30", "2008-12-31", "2009-03-31", "2009-06-30", "2009-09-30", "2009-12-31", "2010-03-31", "2010-06-30", "2010-09-30", "2010-12-31", "2011-03-31", "2011-06-30", "2011-09-30", "2011-12-31", "2012-03-31", "2012-06-30", "2012-09-30", "2012-12-31", "2013-03-31", "2013-06-30", "2013-09-30", "2013-12-31", "2014-03-31", "2014-06-30", "2014-09-30", "2014-12-31", "2015-03-31"], "y": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 0.141, 0.489, 1.036, 0.817, 0.483, 4.406, 2.94, 2.427, 3.06, 4.606, 5.578, 5.445, 5.334, 8.822, 10.239, 12.053, 13.102, 10.604, 23.95, 22.276, 15.821, 16.645, 30.66, 22.955, 18.154, 19.51, 32.498, 26.064, 19.751, 23.678, 51.182, 40.282], "zmax": 11, "zmin": 0, "xbins": { "end": 1577862000000, "size": "M60", "start": 788943600000 }, "ybins": { "end": 60, "size": 10, "start": 0 }, "marker": { "line": { "color": "white", "width": 0 }, "color": "rgb(0, 67, 88)" }, "error_x": {"copy_ystyle": True}, "error_y": { "color": "rgb(0, 67, 88)", "width": 1, "thickness": 1 }, "opacity": 0.7, "autobinx": True, "autobiny": True, "contours": { "end": 0.401, "size": 0.1, "start": -0.4, "coloring": "fill", "showlines": True } } trace2 = { "uid": "6df574", "fill": "tonexty", "mode": "lines", "name": "iPad", "type": "bar", "x": ["1998-12-31", "1999-03-31", "1999-06-30", "1999-09-30", "1999-12-31", "2000-03-31", "2000-06-30", "2000-09-30", "2000-12-31", "2001-03-31", "2001-06-30", "2001-09-30", "2001-12-31", "2002-03-31", "2002-06-30", "2002-09-30", "2002-12-31", "2003-03-31", "2003-06-30", "2003-09-30", "2003-12-31", "2004-03-31", "2004-06-30", "2004-09-30", "2004-12-31", "2005-03-31", "2005-06-30", "2005-09-30", "2005-12-31", "2006-03-31", "2006-06-30", "2006-09-30", "2006-12-31", "2007-03-31", "2007-06-30", "2007-09-30", "2007-12-31", "2008-03-31", "2008-06-30", "2008-09-30", "2008-12-31", "2009-03-31", "2009-06-30", "2009-09-30", "2009-12-31", "2010-03-31", "2010-06-30", "2010-09-30", "2010-12-31", "2011-03-31", "2011-06-30", "2011-09-30", "2011-12-31", "2012-03-31", "2012-06-30", "2012-09-30", "2012-12-31", "2013-03-31", "2013-06-30", "2013-09-30", "2013-12-31", "2014-03-31", "2014-06-30", "2014-09-30", "2014-12-31", "2015-03-31"], "y": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 2.166, 2.792, 4.37, 2.633, 5.603, 6.562, 8.769, 6.264, 8.779, 7.133, 10.674, 8.746, 6.374, 6.186, 11.468, 7.61, 5.889, 5.316, 8.985, 5.428], "zmax": 6, "zmin": 0, "xbins": { "end": 1577862000000, "size": "M60", "start": 788943600000 }, "ybins": { "end": 12, "size": 2, "start": 2 }, "marker": { "line": { "color": "white", "width": 0 }, "color": "rgb(31, 138, 112)" }, "error_x": {"copy_ystyle": True}, "error_y": { "color": "rgb(31, 138, 112)", "width": 1, "thickness": 1 }, "opacity": 0.7, "autobinx": True, "autobiny": True } trace3 = { "uid": "2bb15f", "fill": "tonexty", "mode": "lines", "name": "iPod", "type": "bar", "x": ["1998-12-31", "1999-03-31", "1999-06-30", "1999-09-30", "1999-12-31", "2000-03-31", "2000-06-30", "2000-09-30", "2000-12-31", "2001-03-31", "2001-06-30", "2001-09-30", "2001-12-31", "2002-03-31", "2002-06-30", "2002-09-30", "2002-12-31", "2003-03-31", "2003-06-30", "2003-09-30", "2003-12-31", "2004-03-31", "2004-06-30", "2004-09-30", "2004-12-31", "2005-03-31", "2005-06-30", "2005-09-30", "2005-12-31", "2006-03-31", "2006-06-30", "2006-09-30", "2006-12-31", "2007-03-31", "2007-06-30", "2007-09-30", "2007-12-31", "2008-03-31", "2008-06-30", "2008-09-30", "2008-12-31", "2009-03-31", "2009-06-30", "2009-09-30", "2009-12-31", "2010-03-31", "2010-06-30", "2010-09-30", "2010-12-31", "2011-03-31", "2011-06-30", "2011-09-30", "2011-12-31", "2012-03-31", "2012-06-30", "2012-09-30", "2012-12-31", "2013-03-31", "2013-06-30", "2013-09-30", "2013-12-31", "2014-03-31", "2014-06-30", "2014-09-30", "2014-12-31", "2015-03-31"], "y": ["", "", "", "", "", "", "", "", "", "", "", "", 0.046, 0.022, 0.022, 0.053, 0.081, 0.031, 0.111, 0.121, 0.256, 0.264, 0.249, 0.537, 1.211, 1.014, 1.103, 1.212, 2.906, 1.714, 1.497, 1.559, 3.427, 1.689, 1.57, 1.619, 3.997, 1.818, 1.678, 1.66, 3.371, 1.665, 1.492, 1.563, 3.391, 1.861, 1.545, 1.477, 3.425, 1.6, 1.325, 1.103], "zmax": 11, "zmin": 0, "xbins": { "end": 1420095600000, "size": "M60", "start": 788943600000 }, "ybins": { "end": 4.5, "size": 1, "start": -0.5 }, "marker": { "line": { "color": "white", "width": 0 }, "color": "rgb(190, 219, 57)" }, "error_x": {"copy_ystyle": True}, "error_y": { "color": "rgb(190, 219, 57)", "width": 1, "thickness": 1 }, "opacity": 0.7, "autobinx": True, "autobiny": True } trace4 = { "uid": "e4f15f", "fill": "tonexty", "mode": "lines", "name": "Mac", "type": "bar", "x": ["1998-12-31", "1999-03-31", "1999-06-30", "1999-09-30", "1999-12-31", "2000-03-31", "2000-06-30", "2000-09-30", "2000-12-31", "2001-03-31", "2001-06-30", "2001-09-30", "2001-12-31", "2002-03-31", "2002-06-30", "2002-09-30", "2002-12-31", "2003-03-31", "2003-06-30", "2003-09-30", "2003-12-31", "2004-03-31", "2004-06-30", "2004-09-30", "2004-12-31", "2005-03-31", "2005-06-30", "2005-09-30", "2005-12-31", "2006-03-31", "2006-06-30", "2006-09-30", "2006-12-31", "2007-03-31", "2007-06-30", "2007-09-30", "2007-12-31", "2008-03-31", "2008-06-30", "2008-09-30", "2008-12-31", "2009-03-31", "2009-06-30", "2009-09-30", "2009-12-31", "2010-03-31", "2010-06-30", "2010-09-30", "2010-12-31", "2011-03-31", "2011-06-30", "2011-09-30", "2011-12-31", "2012-03-31", "2012-06-30", "2012-09-30", "2012-12-31", "2013-03-31", "2013-06-30", "2013-09-30", "2013-12-31", "2014-03-31", "2014-06-30", "2014-09-30", "2014-12-31", "2015-03-31"], "y": [1.443, 1.26, 1.294, 1.085, 2.065, 1.652, 1.545, 1.604, 0.776, 1.2, 1.225, 1.202, 1.071, 1.209, 1.16, 1.094, 1.099, 1.099, 1.094, 1.2, 1.269, 1.16, 1.263, 1.231, 1.605, 1.494, 1.565, 1.611, 1.724, 1.572, 1.866, 2.213, 2.417, 2.271, 2.533, 3.115, 3.57, 3.511, 3.634, 3.639, 3.565, 2.96, 3.354, 3.98, 4.45, 3.76, 4.399, 4.87, 5.43, 4.976, 5.105, 6.272, 6.598, 5.073, 4.933, 6.617, 5.519, 5.447, 4.893, 5.624, 6.395, 5.519, 5.54, 6.625, 6.944, 5.615], "zmax": 20, "zmin": 0, "xbins": { "end": 1577862000000, "size": "M60", "start": 788943600000 }, "ybins": { "end": 8, "size": 2, "start": 0 }, "marker": { "line": { "color": "white", "width": 0 }, "color": "rgb(255, 225, 26)" }, "error_x": {"copy_ystyle": True}, "error_y": { "color": "rgb(255, 225, 26)", "width": 1, "thickness": 1 }, "opacity": 0.7, "autobinx": True, "autobiny": True } trace5 = { "uid": "28c42c", "fill": "tonexty", "mode": "lines", "name": "Services", "type": "bar", "x": ["1998-12-31", "1999-03-31", "1999-06-30", "1999-09-30", "1999-12-31", "2000-03-31", "2000-06-30", "2000-09-30", "2000-12-31", "2001-03-31", "2001-06-30", "2001-09-30", "2001-12-31", "2002-03-31", "2002-06-30", "2002-09-30", "2002-12-31", "2003-03-31", "2003-06-30", "2003-09-30", "2003-12-31", "2004-03-31", "2004-06-30", "2004-09-30", "2004-12-31", "2005-03-31", "2005-06-30", "2005-09-30", "2005-12-31", "2006-03-31", "2006-06-30", "2006-09-30", "2006-12-31", "2007-03-31", "2007-06-30", "2007-09-30", "2007-12-31", "2008-03-31", "2008-06-30", "2008-09-30", "2008-12-31", "2009-03-31", "2009-06-30", "2009-09-30", "2009-12-31", "2010-03-31", "2010-06-30", "2010-09-30", "2010-12-31", "2011-03-31", "2011-06-30", "2011-09-30", "2011-12-31", "2012-03-31", "2012-06-30", "2012-09-30", "2012-12-31", "2013-03-31", "2013-06-30", "2013-09-30", "2013-12-31", "2014-03-31", "2014-06-30", "2014-09-30", "2014-12-31", "2015-03-31"], "y": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 2.147, 2.384, 2.338, 2.504, 3.02, 3.171, 3.203, 3.496, 3.687, 4.114, 3.99, 4.26, 4.397, 4.573, 4.485, 4.608, 4.799, 4.996], "zmax": 7, "zmin": 0, "xbins": { "end": 1577862000000, "size": "M60", "start": 788943600000 }, "ybins": { "end": 5, "size": 1, "start": 2 }, "marker": { "line": { "color": "white", "width": 0 }, "color": "rgb(253, 116, 0)" }, "error_x": {"copy_ystyle": True}, "error_y": { "color": "rgb(253, 116, 0)", "width": 1, "thickness": 1 }, "opacity": 0.7, "autobinx": True, "autobiny": True } trace6 = { "uid": "3f8dfe", "fill": "tonexty", "mode": "lines", "name": "Other products", "type": "bar", "x": ["1998-12-31", "1999-03-31", "1999-06-30", "1999-09-30", "1999-12-31", "2000-03-31", "2000-06-30", "2000-09-30", "2000-12-31", "2001-03-31", "2001-06-30", "2001-09-30", "2001-12-31", "2002-03-31", "2002-06-30", "2002-09-30", "2002-12-31", "2003-03-31", "2003-06-30", "2003-09-30", "2003-12-31", "2004-03-31", "2004-06-30", "2004-09-30", "2004-12-31", "2005-03-31", "2005-06-30", "2005-09-30", "2005-12-31", "2006-03-31", "2006-06-30", "2006-09-30", "2006-12-31", "2007-03-31", "2007-06-30", "2007-09-30", "2007-12-31", "2008-03-31", "2008-06-30", "2008-09-30", "2008-12-31", "2009-03-31", "2009-06-30", "2009-09-30", "2009-12-31", "2010-03-31", "2010-06-30", "2010-09-30", "2010-12-31", "2011-03-31", "2011-06-30", "2011-09-30", "2011-12-31", "2012-03-31", "2012-06-30", "2012-09-30", "2012-12-31", "2013-03-31", "2013-06-30", "2013-09-30", "2013-12-31", "2014-03-31", "2014-06-30", "2014-09-30", "2014-12-31", "2015-03-31"], "y": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 1.13, 1.021, 1.098, 1.225, 3.996, 2.402, 2.287, 2.075, 3.972, 2.341, 1.912, 1.892, 2.836, 1.88, 1.767, 1.896, 2.689, 1.689], "zmax": 9, "zmin": 0, "xbins": { "end": 1577862000000, "size": "M60", "start": 788943600000 }, "ybins": { "end": 4.5, "size": 1, "start": 0.5 }, "marker": { "line": { "color": "white", "width": 0 }, "color": "rgb(166, 28, 0)" }, "error_x": {"copy_ystyle": True}, "error_y": { "color": "rgb(166, 28, 0)", "width": 1, "thickness": 1 }, "opacity": 0.7, "autobinx": True, "autobiny": True } trace7 = { "uid": "4af1c4", "fill": "tonexty", "mode": "lines", "name": "Peripherals", "type": "bar", "x": ["1998-12-31", "1999-03-31", "1999-06-30", "1999-09-30", "1999-12-31", "2000-03-31", "2000-06-30", "2000-09-30", "2000-12-31", "2001-03-31", "2001-06-30", "2001-09-30", "2001-12-31", "2002-03-31", "2002-06-30", "2002-09-30", "2002-12-31", "2003-03-31", "2003-06-30", "2003-09-30", "2003-12-31", "2004-03-31", "2004-06-30", "2004-09-30", "2004-12-31", "2005-03-31", "2005-06-30", "2005-09-30", "2005-12-31", "2006-03-31", "2006-06-30", "2006-09-30", "2006-12-31", "2007-03-31", "2007-06-30", "2007-09-30", "2007-12-31", "2008-03-31", "2008-06-30", "2008-09-30", "2008-12-31", "2009-03-31", "2009-06-30", "2009-09-30", "2009-12-31", "2010-03-31", "2010-06-30", "2010-09-30", "2010-12-31", "2011-03-31", "2011-06-30", "2011-09-30", "2011-12-31", "2012-03-31", "2012-06-30", "2012-09-30", "2012-12-31", "2013-03-31", "2013-06-30", "2013-09-30", "2013-12-31", "2014-03-31", "2014-06-30", "2014-09-30", "2014-12-31", "2015-03-31"], "y": [0.134, 0.135, 0.132, 0.126, 0.139, 0.147, 0.14, 0.133, 0.119, 0.106, 0.124, 0.128, 0.134, 0.131, 0.126, 0.14, 0.137, 0.185, 0.168, 0.208, 0.222, 0.238, 0.219, 0.271, 0.284, 0.28, 0.266, 0.296, 0.303, 0.264, 0.236, 0.297, 0.297, 0.328, 0.325, 0.353, 0.391, 0.424, 0.446, 0.433, 0.387, 0.357, 0.34, 0.391, 0.469, 0.472, 0.396, 0.477], "zmax": 14, "zmin": 0, "xbins": { "end": 1420095600000, "size": "M60", "start": 788943600000 }, "ybins": { "end": 0.5, "size": 0.1, "start": 0.1 }, "marker": { "line": { "color": "white", "width": 0 }, "color": "rgb(0, 67, 88)" }, "error_x": {"copy_ystyle": True}, "error_y": { "color": "rgb(0, 67, 88)", "width": 1, "thickness": 1 }, "opacity": 0.7, "autobinx": True, "autobiny": True } trace8 = { "uid": "ce8cbd", "fill": "tonexty", "mode": "lines", "name": "Software", "type": "bar", "x": ["1998-12-31", "1999-03-31", "1999-06-30", "1999-09-30", "1999-12-31", "2000-03-31", "2000-06-30", "2000-09-30", "2000-12-31", "2001-03-31", "2001-06-30", "2001-09-30", "2001-12-31", "2002-03-31", "2002-06-30", "2002-09-30", "2002-12-31", "2003-03-31", "2003-06-30", "2003-09-30", "2003-12-31", "2004-03-31", "2004-06-30", "2004-09-30", "2004-12-31", "2005-03-31", "2005-06-30", "2005-09-30", "2005-12-31", "2006-03-31", "2006-06-30", "2006-09-30", "2006-12-31", "2007-03-31", "2007-06-30", "2007-09-30", "2007-12-31", "2008-03-31", "2008-06-30", "2008-09-30", "2008-12-31", "2009-03-31", "2009-06-30", "2009-09-30", "2009-12-31", "2010-03-31", "2010-06-30", "2010-09-30", "2010-12-31", "2011-03-31", "2011-06-30", "2011-09-30", "2011-12-31", "2012-03-31", "2012-06-30", "2012-09-30", "2012-12-31", "2013-03-31", "2013-06-30", "2013-09-30", "2013-12-31", "2014-03-31", "2014-06-30", "2014-09-30", "2014-12-31", "2015-03-31"], "y": [0.133, 0.135, 0.132, 0.125, 0.139, 0.146, 0.14, 0.133, 0.112, 0.125, 0.126, 0.12, 0.124, 0.133, 0.121, 0.156, 0.155, 0.16, 0.16, 0.172, 0.212, 0.187, 0.21, 0.213, 0.213, 0.239, 0.345, 0.294, 0.325, 0.324, 0.314, 0.316, 0.348, 0.345, 0.386, 0.429, 0.628, 0.529, 0.501, 0.55, 0.606, 0.626, 0.53, 0.649, 0.631, 0.634, 0.646, 0.662], "zmax": 16, "zmin": 0, "xbins": { "end": 1420095600000, "size": "M60", "start": 788943600000 }, "ybins": { "end": 0.8, "size": 0.2, "start": 0 }, "marker": { "line": { "color": "white", "width": 0 }, "color": "rgb(31, 138, 112)" }, "error_x": {"copy_ystyle": True}, "error_y": { "color": "rgb(31, 138, 112)", "width": 1, "thickness": 1 }, "opacity": 0.7, "autobinx": True, "autobiny": True } trace9 = { "uid": "b93725", "fill": "tonexty", "mode": "lines", "name": "Music", "type": "bar", "x": ["1998-12-31", "1999-03-31", "1999-06-30", "1999-09-30", "1999-12-31", "2000-03-31", "2000-06-30", "2000-09-30", "2000-12-31", "2001-03-31", "2001-06-30", "2001-09-30", "2001-12-31", "2002-03-31", "2002-06-30", "2002-09-30", "2002-12-31", "2003-03-31", "2003-06-30", "2003-09-30", "2003-12-31", "2004-03-31", "2004-06-30", "2004-09-30", "2004-12-31", "2005-03-31", "2005-06-30", "2005-09-30", "2005-12-31", "2006-03-31", "2006-06-30", "2006-09-30", "2006-12-31", "2007-03-31", "2007-06-30", "2007-09-30", "2007-12-31", "2008-03-31", "2008-06-30", "2008-09-30", "2008-12-31", "2009-03-31", "2009-06-30", "2009-09-30", "2009-12-31", "2010-03-31", "2010-06-30", "2010-09-30", "2010-12-31", "2011-03-31", "2011-06-30", "2011-09-30", "2011-12-31", "2012-03-31", "2012-06-30", "2012-09-30", "2012-12-31", "2013-03-31", "2013-06-30", "2013-09-30", "2013-12-31", "2014-03-31", "2014-06-30", "2014-09-30", "2014-12-31", "2015-03-31"], "y": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 0.012, 0.014, 0.047, 0.06, 0.073, 0.098, 0.177, 0.216, 0.241, 0.265, 0.491, 0.485, 0.457, 0.452, 0.634, 0.653, 0.608, 0.601, 0.808, 0.881, 0.819, 0.832, 1.011, 1.049, 0.958, 1.018, 1.164, 1.327, 1.214, 1.243], "zmax": 9, "zmin": 0, "xbins": { "end": 1420095600000, "size": "M60", "start": 788943600000 }, "ybins": { "end": 1.5, "size": 0.5, "start": 0 }, "marker": { "line": { "color": "white", "width": 0 }, "color": "rgb(190, 219, 57)" }, "error_x": {"copy_ystyle": True}, "error_y": { "color": "rgb(190, 219, 57)", "width": 1, "thickness": 1 }, "opacity": 0.7, "autobinx": True, "autobiny": True } data = Data([trace1, trace2, trace3, trace4, trace5, trace6, trace7, trace8, trace9]) layout = { "font": { "size": 12, "color": "#444", "family": "\"Open sans\", verdana, arial, sans-serif" }, "title": "Apple Product Mix", "width": 877, "xaxis": { "type": "date", "dtick": 1, "range": [1289892600000, 1431667800000], "tick0": 0, "ticks": "", "mirror": "allticks", "nticks": 0, "ticklen": 6, "autotick": True, "showgrid": True, "showline": False, "tickfont": { "size": 12, "color": "#444", "family": "\"Open sans\", verdana, arial, sans-serif" }, "zeroline": True, "autorange": False, "gridcolor": "#eee", "gridwidth": 1, "linecolor": "rgb(34,34,34)", "linewidth": 1, "rangemode": "normal", "tickangle": "auto", "tickcolor": "rgba(0, 0, 0, 0)", "titlefont": { "size": 14, "color": "#444", "family": "\"Open sans\", verdana, arial, sans-serif" }, "zerolinecolor": "#444", "zerolinewidth": 1, "showticklabels": True }, "yaxis": { "type": "linear", "dtick": 1, "range": [0, 100], "tick0": 0, "ticks": "", "title": "Percent of Quarterly Revenue", "mirror": "allticks", "nticks": 0, "ticklen": 6, "autotick": True, "showgrid": True, "showline": False, "tickfont": { "size": 12, "color": "#444", "family": "\"Open sans\", verdana, arial, sans-serif" }, "zeroline": True, "autorange": True, "gridcolor": "#eee", "gridwidth": 1, "linecolor": "rgb(34,34,34)", "linewidth": 1, "rangemode": "normal", "tickangle": "auto", "tickcolor": "rgba(0, 0, 0, 0)", "titlefont": { "size": 14, "color": "#444", "family": "\"Open sans\", verdana, arial, sans-serif" }, "showexponent": "all", "zerolinecolor": "#444", "zerolinewidth": 1, "exponentformat": "B", "showticklabels": True }, "bargap": 0.05, "height": 838, "legend": { "x": 0.8, "y": 0.15, "font": { "size": 12, "color": "#444", "family": "\"Open sans\", verdana, arial, sans-serif" }, "xref": "paper", "yref": "paper", "bgcolor": "#fff", "xanchor": "left", "yanchor": "middle", "traceorder": "normal", "bordercolor": "#444", "borderwidth": 0 }, "barmode": "stack", "barnorm": "percent", "autosize": True, "dragmode": "zoom", "hovermode": "x", "titlefont": { "size": 20, "color": "#444", "family": "\"Open sans\", verdana, arial, sans-serif" }, "separators": ".,", "showlegend": True, "bargroupgap": 0, "hidesources": False, "plot_bgcolor": "#fff", "paper_bgcolor": "#fff" } fig = Figure(data=data, layout=layout) plot_url = py.plot(fig)