# Get this figure: fig <- get_figure("krmarko", 86) # Get this figure's data: data <- get_figure("krmarko", 86)$data # Add data to this figure: p <- add_trace(p, x=c(4, 5), y=c(4, 5), kwargs=list(filename="Apple Product Mix", fileopt="extend")) # Get y data of first trace: y1 <- get_figure("krmarko", 86)$data[[1]]$y # Get figure documentation: https://plotly.com/r/get-requests/ # Add data documentation: https://plotly.com/r/file-options/ # You can reproduce this figure in R with the following code! # Learn about API authentication here: https://plotly.com/r/getting-started # Find your api_key here: https://plotly.com/settings/api library(plotly) trace1 <- list( uid = "e6188e", fill = "tonexty", mode = "lines", name = "iPhone", type = "bar", x = c("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 = c("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 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 = list( end = 1577862000000, size = "M60", start = 788943600000 ), ybins = list( end = 60, size = 10, start = 0 ), marker = list( line = list( color = "white", width = 0 ), color = "rgb(0, 67, 88)" ), error_x = list(copy_ystyle = TRUE), error_y = list( color = "rgb(0, 67, 88)", width = 1, thickness = 1 ), opacity = 0.7, autobinx = TRUE, autobiny = TRUE, contours = list( end = 0.401, size = 0.1, start = -0.4, coloring = "fill", showlines = TRUE ) ) trace2 <- list( uid = "6df574", fill = "tonexty", mode = "lines", name = "iPad", type = "bar", x = c("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 = c("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 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 = list( end = 1577862000000, size = "M60", start = 788943600000 ), ybins = list( end = 12, size = 2, start = 2 ), marker = list( line = list( color = "white", width = 0 ), color = "rgb(31, 138, 112)" ), error_x = list(copy_ystyle = TRUE), error_y = list( color = "rgb(31, 138, 112)", width = 1, thickness = 1 ), opacity = 0.7, autobinx = TRUE, autobiny = TRUE ) trace3 <- list( uid = "2bb15f", fill = "tonexty", mode = "lines", name = "iPod", type = "bar", x = c("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 = c("", "", "", "", "", "", "", "", "", "", "", "", 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 = list( end = 1420095600000, size = "M60", start = 788943600000 ), ybins = list( end = 4.5, size = 1, start = -0.5 ), marker = list( line = list( color = "white", width = 0 ), color = "rgb(190, 219, 57)" ), error_x = list(copy_ystyle = TRUE), error_y = list( color = "rgb(190, 219, 57)", width = 1, thickness = 1 ), opacity = 0.7, autobinx = TRUE, autobiny = TRUE ) trace4 <- list( uid = "e4f15f", fill = "tonexty", mode = "lines", name = "Mac", type = "bar", x = c("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 = c(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 = list( end = 1577862000000, size = "M60", start = 788943600000 ), ybins = list( end = 8, size = 2, start = 0 ), marker = list( line = list( color = "white", width = 0 ), color = "rgb(255, 225, 26)" ), error_x = list(copy_ystyle = TRUE), error_y = list( color = "rgb(255, 225, 26)", width = 1, thickness = 1 ), opacity = 0.7, autobinx = TRUE, autobiny = TRUE ) trace5 <- list( uid = "28c42c", fill = "tonexty", mode = "lines", name = "Services", type = "bar", x = c("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 = c("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 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 = list( end = 1577862000000, size = "M60", start = 788943600000 ), ybins = list( end = 5, size = 1, start = 2 ), marker = list( line = list( color = "white", width = 0 ), color = "rgb(253, 116, 0)" ), error_x = list(copy_ystyle = TRUE), error_y = list( color = "rgb(253, 116, 0)", width = 1, thickness = 1 ), opacity = 0.7, autobinx = TRUE, autobiny = TRUE ) trace6 <- list( uid = "3f8dfe", fill = "tonexty", mode = "lines", name = "Other products", type = "bar", x = c("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 = c("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 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 = list( end = 1577862000000, size = "M60", start = 788943600000 ), ybins = list( end = 4.5, size = 1, start = 0.5 ), marker = list( line = list( color = "white", width = 0 ), color = "rgb(166, 28, 0)" ), error_x = list(copy_ystyle = TRUE), error_y = list( color = "rgb(166, 28, 0)", width = 1, thickness = 1 ), opacity = 0.7, autobinx = TRUE, autobiny = TRUE ) trace7 <- list( uid = "4af1c4", fill = "tonexty", mode = "lines", name = "Peripherals", type = "bar", x = c("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 = c(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 = list( end = 1420095600000, size = "M60", start = 788943600000 ), ybins = list( end = 0.5, size = 0.1, start = 0.1 ), marker = list( line = list( color = "white", width = 0 ), color = "rgb(0, 67, 88)" ), error_x = list(copy_ystyle = TRUE), error_y = list( color = "rgb(0, 67, 88)", width = 1, thickness = 1 ), opacity = 0.7, autobinx = TRUE, autobiny = TRUE ) trace8 <- list( uid = "ce8cbd", fill = "tonexty", mode = "lines", name = "Software", type = "bar", x = c("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 = c(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 = list( end = 1420095600000, size = "M60", start = 788943600000 ), ybins = list( end = 0.8, size = 0.2, start = 0 ), marker = list( line = list( color = "white", width = 0 ), color = "rgb(31, 138, 112)" ), error_x = list(copy_ystyle = TRUE), error_y = list( color = "rgb(31, 138, 112)", width = 1, thickness = 1 ), opacity = 0.7, autobinx = TRUE, autobiny = TRUE ) trace9 <- list( uid = "b93725", fill = "tonexty", mode = "lines", name = "Music", type = "bar", x = c("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 = c("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 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 = list( end = 1420095600000, size = "M60", start = 788943600000 ), ybins = list( end = 1.5, size = 0.5, start = 0 ), marker = list( line = list( color = "white", width = 0 ), color = "rgb(190, 219, 57)" ), error_x = list(copy_ystyle = TRUE), error_y = list( color = "rgb(190, 219, 57)", width = 1, thickness = 1 ), opacity = 0.7, autobinx = TRUE, autobiny = TRUE ) data <- list(trace1, trace2, trace3, trace4, trace5, trace6, trace7, trace8, trace9) layout <- list( font = list( size = 12, color = "#444", family = "\"Open sans\", verdana, arial, sans-serif" ), title = "Apple Product Mix", width = 877, xaxis = list( type = "date", dtick = 1, range = c(1289892600000, 1431667800000), tick0 = 0, ticks = "", mirror = "allticks", nticks = 0, ticklen = 6, autotick = TRUE, showgrid = TRUE, showline = FALSE, tickfont = list( 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 = list( size = 14, color = "#444", family = "\"Open sans\", verdana, arial, sans-serif" ), zerolinecolor = "#444", zerolinewidth = 1, showticklabels = TRUE ), yaxis = list( type = "linear", dtick = 1, range = c(0, 100), tick0 = 0, ticks = "", title = "Percent of Quarterly Revenue", mirror = "allticks", nticks = 0, ticklen = 6, autotick = TRUE, showgrid = TRUE, showline = FALSE, tickfont = list( 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 = list( 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 = list( x = 0.8, y = 0.15, font = list( 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 = list( size = 20, color = "#444", family = "\"Open sans\", verdana, arial, sans-serif" ), separators = ".,", showlegend = TRUE, bargroupgap = 0, hidesources = FALSE, plot_bgcolor = "#fff", paper_bgcolor = "#fff" ) p <- plot_ly() p <- add_trace(p, uid=trace1$uid, fill=trace1$fill, mode=trace1$mode, name=trace1$name, type=trace1$type, x=trace1$x, y=trace1$y, zmax=trace1$zmax, zmin=trace1$zmin, xbins=trace1$xbins, ybins=trace1$ybins, marker=trace1$marker, error_x=trace1$error_x, error_y=trace1$error_y, opacity=trace1$opacity, autobinx=trace1$autobinx, autobiny=trace1$autobiny, contours=trace1$contours) p <- add_trace(p, uid=trace2$uid, fill=trace2$fill, mode=trace2$mode, name=trace2$name, type=trace2$type, x=trace2$x, y=trace2$y, zmax=trace2$zmax, zmin=trace2$zmin, xbins=trace2$xbins, ybins=trace2$ybins, marker=trace2$marker, error_x=trace2$error_x, error_y=trace2$error_y, opacity=trace2$opacity, autobinx=trace2$autobinx, autobiny=trace2$autobiny) p <- add_trace(p, uid=trace3$uid, fill=trace3$fill, mode=trace3$mode, name=trace3$name, type=trace3$type, x=trace3$x, y=trace3$y, zmax=trace3$zmax, zmin=trace3$zmin, xbins=trace3$xbins, ybins=trace3$ybins, marker=trace3$marker, error_x=trace3$error_x, error_y=trace3$error_y, opacity=trace3$opacity, autobinx=trace3$autobinx, autobiny=trace3$autobiny) p <- add_trace(p, uid=trace4$uid, fill=trace4$fill, mode=trace4$mode, name=trace4$name, type=trace4$type, x=trace4$x, y=trace4$y, zmax=trace4$zmax, zmin=trace4$zmin, xbins=trace4$xbins, ybins=trace4$ybins, marker=trace4$marker, error_x=trace4$error_x, error_y=trace4$error_y, opacity=trace4$opacity, autobinx=trace4$autobinx, autobiny=trace4$autobiny) p <- add_trace(p, uid=trace5$uid, fill=trace5$fill, mode=trace5$mode, name=trace5$name, type=trace5$type, x=trace5$x, y=trace5$y, zmax=trace5$zmax, zmin=trace5$zmin, xbins=trace5$xbins, ybins=trace5$ybins, marker=trace5$marker, error_x=trace5$error_x, error_y=trace5$error_y, opacity=trace5$opacity, autobinx=trace5$autobinx, autobiny=trace5$autobiny) p <- add_trace(p, uid=trace6$uid, fill=trace6$fill, mode=trace6$mode, name=trace6$name, type=trace6$type, x=trace6$x, y=trace6$y, zmax=trace6$zmax, zmin=trace6$zmin, xbins=trace6$xbins, ybins=trace6$ybins, marker=trace6$marker, error_x=trace6$error_x, error_y=trace6$error_y, opacity=trace6$opacity, autobinx=trace6$autobinx, autobiny=trace6$autobiny) p <- add_trace(p, uid=trace7$uid, fill=trace7$fill, mode=trace7$mode, name=trace7$name, type=trace7$type, x=trace7$x, y=trace7$y, zmax=trace7$zmax, zmin=trace7$zmin, xbins=trace7$xbins, ybins=trace7$ybins, marker=trace7$marker, error_x=trace7$error_x, error_y=trace7$error_y, opacity=trace7$opacity, autobinx=trace7$autobinx, autobiny=trace7$autobiny) p <- add_trace(p, uid=trace8$uid, fill=trace8$fill, mode=trace8$mode, name=trace8$name, type=trace8$type, x=trace8$x, y=trace8$y, zmax=trace8$zmax, zmin=trace8$zmin, xbins=trace8$xbins, ybins=trace8$ybins, marker=trace8$marker, error_x=trace8$error_x, error_y=trace8$error_y, opacity=trace8$opacity, autobinx=trace8$autobinx, autobiny=trace8$autobiny) p <- add_trace(p, uid=trace9$uid, fill=trace9$fill, mode=trace9$mode, name=trace9$name, type=trace9$type, x=trace9$x, y=trace9$y, zmax=trace9$zmax, zmin=trace9$zmin, xbins=trace9$xbins, ybins=trace9$ybins, marker=trace9$marker, error_x=trace9$error_x, error_y=trace9$error_y, opacity=trace9$opacity, autobinx=trace9$autobinx, autobiny=trace9$autobiny) p <- layout(p, font=layout$font, title=layout$title, width=layout$width, xaxis=layout$xaxis, yaxis=layout$yaxis, bargap=layout$bargap, height=layout$height, legend=layout$legend, barmode=layout$barmode, barnorm=layout$barnorm, autosize=layout$autosize, dragmode=layout$dragmode, hovermode=layout$hovermode, titlefont=layout$titlefont, separators=layout$separators, showlegend=layout$showlegend, bargroupgap=layout$bargroupgap, hidesources=layout$hidesources, plot_bgcolor=layout$plot_bgcolor, paper_bgcolor=layout$paper_bgcolor)