2
7/23/2019 Hot Warm Slightly Warm Neutral Slightly Cool Cool Cold.r http://slidepdf.com/reader/full/hot-warm-slightly-warm-neutral-slightly-cool-cool-coldr 1/2 # Get this figure: fig <- py$get_figure("sprite728", 20) # Get this figure's data: data <- py$get_figure("sprite728", 20)$data # Add data to this figure: py$plotly(list(x=c(4, 5), y=c(4, 5)), kwargs=list(fil ename="Thermal Comfort Distribution", fileopt="extend")) # Get y data of first trace: y1 <- py$get_figure("sprite728", 20)$data[[1]]$y # Get figure documentation: https://plot.ly/r/get-requests/ # Add data documentation: https://plot.ly/r/file-options/ # You can reproduce this figure in R with the following code! # Learn about API authentication here: https://plot.ly/r/getting-started # Find your api_key here: https://plot.ly/settings/api library(plotly) py <- plotly(username='username', key='api_key') trace1 <- list(  x = c("sdeochen", "[email protected]", "[email protected]", "wolfga ng8741", "[email protected]"), y = c(0.0431654676259, 0.0215517241379, 0.0416666666667, 0.025641025641, 0.014 598540146), marker = list(color = "rgb(92,0,2)"), name = "hot", type = "bar" ) trace2 <- list(  x = c("[email protected]", "[email protected]", "[email protected]" , "[email protected]", "[email protected]", "[email protected]", "wolfg ang8741", "jooh55", "muthas", "sdeochen", "[email protected]"), y = c(0.0078125, 0.108333333333, 0.0714285714286, 0.0425531914894, 0.025862068 9655, 0.030303030303, 0.0897435897436, 0.0232558139535, 0.0440251572327, 0.17985 6115108, 0.0656934306569), marker = list(color = "rgb(191,22,22)"), name = "warm", type = "bar" ) trace3 <- list(  x = c("jooh55", "[email protected]", "[email protected]", "rcd106@ma il.usask.ca", "[email protected]", "[email protected]", "wolfgang8741", "t [email protected]", "muthas", "sdeochen", "[email protected]"), y = c(0.110465116279, 0.216666666667, 0.047619047619, 0.276595744681, 0.142241 37931, 0.161616161616, 0.198717948718, 0.1484375, 0.125786163522, 0.215827338129 , 0.167883211679), marker = list(color = "rgb(255,191,180)"), name = "slightly warm", type = "bar" ) trace4 <- list(  x = c("jooh55", "[email protected]", "[email protected]", "rcd106@ma il.usask.ca", "[email protected]", "[email protected]", "wolfgang8741", "t [email protected]", "muthas", "sdeochen", "[email protected]"), y = c(0.691860465116, 0.408333333333, 0.666666666667, 0.255319148936, 0.741379 310345, 0.515151515152, 0.423076923077, 0.625, 0.452830188679, 0.352517985612, 0 .124087591241), marker = list(color = "rgb(203,201,207)"), name = "neutral", type = "bar" ) trace5 <- list(  x = c("jooh55", "[email protected]", "[email protected]", "rcd106@ma

Hot Warm Slightly Warm Neutral Slightly Cool Cool Cold.r

Embed Size (px)

Citation preview

Page 1: Hot Warm Slightly Warm Neutral Slightly Cool Cool Cold.r

7/23/2019 Hot Warm Slightly Warm Neutral Slightly Cool Cool Cold.r

http://slidepdf.com/reader/full/hot-warm-slightly-warm-neutral-slightly-cool-cool-coldr 1/2

# Get this figure: fig <- py$get_figure("sprite728", 20)# Get this figure's data: data <- py$get_figure("sprite728", 20)$data# Add data to this figure: py$plotly(list(x=c(4, 5), y=c(4, 5)), kwargs=list(filename="Thermal Comfort Distribution", fileopt="extend"))# Get y data of first trace: y1 <- py$get_figure("sprite728", 20)$data[[1]]$y

# Get figure documentation: https://plot.ly/r/get-requests/# Add data documentation: https://plot.ly/r/file-options/

# You can reproduce this figure in R with the following code!

# Learn about API authentication here: https://plot.ly/r/getting-started# Find your api_key here: https://plot.ly/settings/api

library(plotly)py <- plotly(username='username', key='api_key')trace1 <- list(  x = c("sdeochen", "[email protected]", "[email protected]", "wolfgang8741", "[email protected]"),y = c(0.0431654676259, 0.0215517241379, 0.0416666666667, 0.025641025641, 0.014

598540146),marker = list(color = "rgb(92,0,2)"),name = "hot",type = "bar"

)trace2 <- list(  x = c("[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]", "wolfgang8741", "jooh55", "muthas", "sdeochen", "[email protected]"),y = c(0.0078125, 0.108333333333, 0.0714285714286, 0.0425531914894, 0.025862068

9655, 0.030303030303, 0.0897435897436, 0.0232558139535, 0.0440251572327, 0.179856115108, 0.0656934306569),marker = list(color = "rgb(191,22,22)"),name = "warm",type = "bar"

)trace3 <- list(

  x = c("jooh55", "[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]", "wolfgang8741", "[email protected]", "muthas", "sdeochen", "[email protected]"),y = c(0.110465116279, 0.216666666667, 0.047619047619, 0.276595744681, 0.142241

37931, 0.161616161616, 0.198717948718, 0.1484375, 0.125786163522, 0.215827338129, 0.167883211679),marker = list(color = "rgb(255,191,180)"),name = "slightly warm",type = "bar"

)trace4 <- list(  x = c("jooh55", "[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]", "wolfgang8741", "t

[email protected]", "muthas", "sdeochen", "[email protected]"),y = c(0.691860465116, 0.408333333333, 0.666666666667, 0.255319148936, 0.741379

310345, 0.515151515152, 0.423076923077, 0.625, 0.452830188679, 0.352517985612, 0.124087591241),marker = list(color = "rgb(203,201,207)"),name = "neutral",type = "bar"

)trace5 <- list(  x = c("jooh55", "[email protected]", "[email protected]", "rcd106@ma

Page 2: Hot Warm Slightly Warm Neutral Slightly Cool Cool Cold.r

7/23/2019 Hot Warm Slightly Warm Neutral Slightly Cool Cool Cold.r

http://slidepdf.com/reader/full/hot-warm-slightly-warm-neutral-slightly-cool-cool-coldr 2/2

il.usask.ca", "[email protected]", "[email protected]", "wolfgang8741", "[email protected]", "muthas", "sdeochen", "[email protected]"),y = c(0.156976744186, 0.166666666667, 0.119047619048, 0.255319148936, 0.064655

1724138, 0.222222222222, 0.211538461538, 0.21875, 0.320754716981, 0.10071942446, 0.321167883212),marker = list(color = "rgb(127,178,240)"),name = "slightly cool",type = "bar"

)trace6 <- list(  x = c("[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]", "wolfgang8741", "jooh55", "muthas", "sdeochen", "[email protected]"),y = c(0.0416666666667, 0.0952380952381, 0.106382978723, 0.00431034482759, 0.07

07070707071, 0.0512820512821, 0.0174418604651, 0.0503144654088, 0.0719424460432, 0.197080291971),marker = list(color = "rgb(78,122,199)"),name = "cool",type = "bar"

)trace7 <- list(  x = c("[email protected]", "sdeochen", "[email protected]", "muthas", "[email protected]"),y = c(0.063829787234, 0.0359712230216, 0.0166666666667, 0.0062893081761, 0.109

489051095),marker = list(color = "rgb(36,43,110)"),name = "cold",type = "bar"

)data <- list(trace1, trace2, trace3, trace4, trace5, trace6, trace7)layout <- list(barmode = "stack")response <- py$plotly(data, kwargs=list(layout=layout))url <- response$url