import $ivy.`org.plotly-scala::plotly-almond:0.5.2`
import plotly._
import plotly.element._
import plotly.layout._
import plotly.Almond._
// if you want to have the plots available without an internet connection:
// init(offline=true)
import $ivy.$ import plotly._ import plotly.element._ import plotly.layout._ import plotly.Almond._ // if you want to have the plots available without an internet connection: // init(offline=true)
val trace1 = Scatter(
Seq(1, 2, 3, 4),
Seq(10, 15, 13, 17)
)
val trace2 = Scatter(
Seq(1, 2, 3, 4),
Seq(16, 5, 11, 9)
)
val data = Seq(trace1, trace2)
plot(data)
trace1: Scatter = Scatter( Some(Doubles(List(1.0, 2.0, 3.0, 4.0))), Some(Doubles(List(10.0, 15.0, 13.0, 17.0))), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None ) trace2: Scatter = Scatter( Some(Doubles(List(1.0, 2.0, 3.0, 4.0))), Some(Doubles(List(16.0, 5.0, 11.0, 9.0))), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None ) data: Seq[Scatter] = List( Scatter( Some(Doubles(List(1.0, 2.0, 3.0, 4.0))), Some(Doubles(List(10.0, 15.0, 13.0, 17.0))), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None ), Scatter( Some(Doubles(List(1.0, 2.0, 3.0, 4.0))), Some(Doubles(List(16.0, 5.0, 11.0, 9.0))), None, None, None, None, None, None, None, None, None, None, None, None, ... res1_3: String = "plot-133448550"
val trace1 = Scatter(
Seq(1, 2, 3, 4),
Seq(10, 15, 13, 17),
mode = ScatterMode(ScatterMode.Markers)
)
val trace2 = Scatter(
Seq(2, 3, 4, 5),
Seq(16, 5, 11, 9),
mode = ScatterMode(ScatterMode.Lines)
)
val trace3 = Scatter(
Seq(1, 2, 3, 4),
Seq(12, 9, 15, 12),
mode = ScatterMode(ScatterMode.Lines, ScatterMode.Markers)
)
val data = Seq(trace1, trace2, trace3)
val layout = Layout(
title = "Line and Scatter Plot"
)
plot(data, layout)
trace1: Scatter = Scatter( Some(Doubles(List(1.0, 2.0, 3.0, 4.0))), Some(Doubles(List(10.0, 15.0, 13.0, 17.0))), None, Some(ScatterMode(Set(Markers))), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None ) trace2: Scatter = Scatter( Some(Doubles(List(2.0, 3.0, 4.0, 5.0))), Some(Doubles(List(16.0, 5.0, 11.0, 9.0))), None, Some(ScatterMode(Set(Lines))), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None ) trace3: Scatter = Scatter( Some(Doubles(List(1.0, 2.0, 3.0, 4.0))), Some(Doubles(List(12.0, 9.0, 15.0, 12.0))), None, Some(ScatterMode(Set(Lines, Markers))), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None ) data: Seq[Scatter] = List( Scatter( Some(Doubles(List(1.0, 2.0, 3.0, 4.0))), Some(Doubles(List(10.0, 15.0, 13.0, 17.0))), None, Some(ScatterMode(Set(Markers))), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None ), Scatter( Some(Doubles(List(2.0, 3.0, 4.0, 5.0))), Some(Doubles(List(16.0, 5.0, 11.0, 9.0))), None, Some(ScatterMode(Set(Lines))), None, None, None, None, None, None, None, None, None, None, ... layout: Layout = Layout( Some("Line and Scatter Plot"), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None ) res2_5: String = "plot-136470585"
val country = Seq(
"Switzerland (2011)",
"Chile (2013)",
"Japan (2014)",
"United States (2012)",
"Slovenia (2014)",
"Canada (2011)",
"Poland (2010)",
"Estonia (2015)",
"Luxembourg (2013)",
"Portugal (2011)"
)
val votingPop = Seq(
40.0, 45.7, 52.0, 53.6, 54.1, 54.2, 54.5, 54.7, 55.1, 56.6
)
val regVoters = Seq(
49.1, 42.0, 52.7, 84.3, 51.7, 61.1, 55.3, 64.2, 91.1, 58.9
)
val trace1 = Scatter(
votingPop,
country,
mode = ScatterMode(ScatterMode.Markers),
name = "Percent of estimated voting age population",
marker = Marker(
color = Color.RGBA(156, 165, 196, 0.95),
line = Line(
color = Color.RGBA(156, 165, 196, 1.0),
width = 1.0
),
symbol = Symbol.Circle(),
size = 16
)
)
val trace2 = Scatter(
regVoters,
country,
mode = ScatterMode(ScatterMode.Markers),
name = "Percent of estimated registered voters",
marker = Marker(
color = Color.RGBA(204, 204, 204, 0.95),
line = Line(
color = Color.RGBA(217, 217, 217, 1.0),
width = 1.0
),
symbol = Symbol.Circle(),
size = 16
)
)
val data = Seq(trace1, trace2)
val layout = Layout(
title = "Votes cast for ten lowest voting age population in OECD countries",
xaxis = Axis(
showgrid = false,
showline = true,
linecolor = Color.RGB(102, 102, 102),
titlefont = Font(
color = Color.RGB(204, 204, 204)
),
tickfont = Font(
color = Color.RGB(102, 102, 102)
),
autotick = false,
dtick = 10.0,
ticks = Ticks.Outside,
tickcolor = Color.RGB(102, 102, 102)
),
margin = Margin(
l = 140,
r = 40,
b = 50,
t = 80
),
legend = Legend(
font = Font(
size = 10
),
yanchor = Anchor.Middle,
xanchor = Anchor.Right
),
width = 600,
height = 400,
paper_bgcolor = Color.RGB(254, 247, 234),
plot_bgcolor = Color.RGB(254, 247, 234),
hovermode = HoverMode.Closest
)
plot(data, layout)
country: Seq[String] = List( "Switzerland (2011)", "Chile (2013)", "Japan (2014)", "United States (2012)", "Slovenia (2014)", "Canada (2011)", "Poland (2010)", "Estonia (2015)", "Luxembourg (2013)", "Portugal (2011)" ) votingPop: Seq[Double] = List( 40.0, 45.7, 52.0, 53.6, 54.1, 54.2, 54.5, 54.7, 55.1, 56.6 ) regVoters: Seq[Double] = List( 49.1, 42.0, 52.7, 84.3, 51.7, 61.1, 55.3, 64.2, 91.1, 58.9 ) trace1: Scatter = Scatter( Some( Doubles(List(40.0, 45.7, 52.0, 53.6, 54.1, 54.2, 54.5, 54.7, 55.1, 56.6)) ), Some( Strings( List( "Switzerland (2011)", "Chile (2013)", "Japan (2014)", "United States (2012)", "Slovenia (2014)", "Canada (2011)", "Poland (2010)", "Estonia (2015)", "Luxembourg (2013)", "Portugal (2011)" ) ) ), None, Some(ScatterMode(Set(Markers))), Some( Marker( Some(One(16)), Some(One(RGBA(156, 165, 196, 0.95))), None, Some( Line( None, Some(One(RGBA(156, 165, 196, 1.0))), Some(One(1.0)), None, None, None ) ), Some(One(Circle(false, false))), None, ... trace2: Scatter = Scatter( Some( Doubles(List(49.1, 42.0, 52.7, 84.3, 51.7, 61.1, 55.3, 64.2, 91.1, 58.9)) ), Some( Strings( List( "Switzerland (2011)", "Chile (2013)", "Japan (2014)", "United States (2012)", "Slovenia (2014)", "Canada (2011)", "Poland (2010)", "Estonia (2015)", "Luxembourg (2013)", "Portugal (2011)" ) ) ), None, Some(ScatterMode(Set(Markers))), Some( Marker( Some(One(16)), Some(One(RGBA(204, 204, 204, 0.95))), None, Some( Line( None, Some(One(RGBA(217, 217, 217, 1.0))), Some(One(1.0)), None, None, None ) ), Some(One(Circle(false, false))), None, ... data: Seq[Scatter] = List( Scatter( Some( Doubles(List(40.0, 45.7, 52.0, 53.6, 54.1, 54.2, 54.5, 54.7, 55.1, 56.6)) ), Some( Strings( List( "Switzerland (2011)", "Chile (2013)", "Japan (2014)", "United States (2012)", "Slovenia (2014)", "Canada (2011)", "Poland (2010)", "Estonia (2015)", "Luxembourg (2013)", "Portugal (2011)" ) ) ), None, Some(ScatterMode(Set(Markers))), Some( Marker( Some(One(16)), Some(One(RGBA(156, 165, 196, 0.95))), None, Some( Line( None, Some(One(RGBA(156, 165, 196, 1.0))), Some(One(1.0)), None, None, None ) ), Some(One(Circle(false, false))), ... layout: Layout = Layout( Some("Votes cast for ten lowest voting age population in OECD countries"), Some( Legend( None, None, None, None, Some(Font(Some(10), None, None)), None, None, Some(Right), Some(Middle) ) ), Some(600), Some(400), None, Some( Axis( None, Some(Font(None, None, Some(RGB(204, 204, 204)))), Some(false), None, None, Some(true), None, Some(RGB(102, 102, 102)), None, Some(false), Some(RGB(102, 102, 102)), None, None, Some(10.0), None, Some(Font(None, None, Some(RGB(102, 102, 102)))), None, None, None, ... res3_7: String = "plot-1752252713"
val data = Seq(
Bar(
Seq("giraffes", "orangutans", "monkeys"),
Seq(20, 14, 23)
)
)
plot(data)
data: Seq[Bar] = List( Bar( Strings(List("giraffes", "orangutans", "monkeys")), Doubles(List(20.0, 14.0, 23.0)), None, None, None, None, None, None, None, None, None, None, None, None, None ) ) res4_1: String = "plot-660078694"
val trace1 = Bar(
Seq("giraffes", "orangutans", "monkeys"),
Seq(20, 14, 23),
name = "SF Zoo"
)
val trace2 = Bar(
Seq("giraffes", "orangutans", "monkeys"),
Seq(12, 18, 29),
name = "LA Zoo"
)
val data = Seq(trace1, trace2)
val layout = Layout(
barmode = BarMode.Group
)
plot(data, layout)
trace1: Bar = Bar( Strings(List("giraffes", "orangutans", "monkeys")), Doubles(List(20.0, 14.0, 23.0)), Some("SF Zoo"), None, None, None, None, None, None, None, None, None, None, None, None ) trace2: Bar = Bar( Strings(List("giraffes", "orangutans", "monkeys")), Doubles(List(12.0, 18.0, 29.0)), Some("LA Zoo"), None, None, None, None, None, None, None, None, None, None, None, None ) data: Seq[Bar] = List( Bar( Strings(List("giraffes", "orangutans", "monkeys")), Doubles(List(20.0, 14.0, 23.0)), Some("SF Zoo"), None, None, None, None, None, None, None, None, None, None, None, None ), Bar( Strings(List("giraffes", "orangutans", "monkeys")), Doubles(List(12.0, 18.0, 29.0)), Some("LA Zoo"), None, None, None, None, None, None, None, None, None, None, None, None ) ) layout: Layout = Layout( None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, Some(Group), None, None, None, None, None, None, None, None, None, None ) res5_4: String = "plot-1178349964"
val xValue = Seq("Product A", "Product B", "Product C")
val yValue = Seq(20, 14, 23)
val trace1 = Bar(
xValue,
yValue,
text = Seq("27% market share", "24% market share", "19% market share"),
marker = Marker(
color = Color.RGB(158, 202, 225),
opacity = 0.6,
line = Line(
color = Color.RGB(8, 48, 107),
width = 1.5
)
)
)
val data = Seq(trace1)
val annotations = xValue.zip(yValue).map {
case (x, y) =>
Annotation(
x = x,
y = y,
text = y.toString,
xanchor = Anchor.Center,
yanchor = Anchor.Bottom,
showarrow = false
)
}
val layout = Layout(
title = "January 2013 Sales Report",
annotations = annotations
)
plot(data, layout)
xValue: Seq[String] = List("Product A", "Product B", "Product C") yValue: Seq[Int] = List(20, 14, 23) trace1: Bar = Bar( Strings(List("Product A", "Product B", "Product C")), Doubles(List(20.0, 14.0, 23.0)), None, Some(List("27% market share", "24% market share", "19% market share")), Some( Marker( None, Some(One(RGB(158, 202, 225))), Some(One(0.6)), Some( Line(None, Some(One(RGB(8, 48, 107))), Some(One(1.5)), None, None, None) ), None, None, None, None, None ) ), None, None, None, None, None, None, None, None, None, None ) data: Seq[Bar] = List( Bar( Strings(List("Product A", "Product B", "Product C")), Doubles(List(20.0, 14.0, 23.0)), None, Some(List("27% market share", "24% market share", "19% market share")), Some( Marker( None, Some(One(RGB(158, 202, 225))), Some(One(0.6)), Some( Line( None, Some(One(RGB(8, 48, 107))), Some(One(1.5)), None, None, None ) ), None, None, None, None, None ) ), None, None, None, None, None, None, None, None, None, None ) ) annotations: Seq[Annotation] = List( Annotation( None, None, Some(StringElement("Product A")), Some(DoubleElement(20.0)), Some(Center), Some(Bottom), Some(StringElement("20")), None, Some(false) ), Annotation( None, None, Some(StringElement("Product B")), Some(DoubleElement(14.0)), Some(Center), Some(Bottom), Some(StringElement("14")), None, Some(false) ), Annotation( None, None, Some(StringElement("Product C")), Some(DoubleElement(23.0)), Some(Center), Some(Bottom), Some(StringElement("23")), None, Some(false) ) ) layout: Layout = Layout( Some("January 2013 Sales Report"), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, Some( List( Annotation( None, None, Some(StringElement("Product A")), Some(DoubleElement(20.0)), Some(Center), Some(Bottom), Some(StringElement("20")), None, Some(false) ), Annotation( None, None, Some(StringElement("Product B")), Some(DoubleElement(14.0)), Some(Center), Some(Bottom), ... res6_6: String = "plot-626918300"
val defaultColor = Color.RGBA(204,204,204,1)
val highlightColor = Color.RGBA(222,45,38,0.8)
val trace1 = Bar(
Seq("Feature A", "Feature B", "Feature C", "Feature D", "Feature E"),
Seq(20, 14, 23, 25, 22),
marker = Marker(
color = Seq(
defaultColor, highlightColor, defaultColor, defaultColor, defaultColor
)
)
)
val data = Seq(trace1)
val layout = Layout(
title = "Least Used Feature"
)
plot(data, layout)
defaultColor: Color.RGBA = RGBA(204, 204, 204, 1.0) highlightColor: Color.RGBA = RGBA(222, 45, 38, 0.8) trace1: Bar = Bar( Strings(List("Feature A", "Feature B", "Feature C", "Feature D", "Feature E")), Doubles(List(20.0, 14.0, 23.0, 25.0, 22.0)), None, None, Some( Marker( None, Some( Sequence( List( RGBA(204, 204, 204, 1.0), RGBA(222, 45, 38, 0.8), RGBA(204, 204, 204, 1.0), RGBA(204, 204, 204, 1.0), RGBA(204, 204, 204, 1.0) ) ) ), None, None, None, None, None, None, None ) ), None, None, None, None, None, None, None, None, None, None ) data: Seq[Bar] = List( Bar( Strings( List("Feature A", "Feature B", "Feature C", "Feature D", "Feature E") ), Doubles(List(20.0, 14.0, 23.0, 25.0, 22.0)), None, None, Some( Marker( None, Some( Sequence( List( RGBA(204, 204, 204, 1.0), RGBA(222, 45, 38, 0.8), RGBA(204, 204, 204, 1.0), RGBA(204, 204, 204, 1.0), RGBA(204, 204, 204, 1.0) ) ) ), None, None, None, None, None, None, None ) ), None, None, None, None, None, None, None, None, ... layout: Layout = Layout( Some("Least Used Feature"), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None ) res7_5: String = "plot-1356760145"
val xData = Seq(
"Product Revenue",
"Services Revenue",
"Total Revenue",
"Fixed Costs",
"Variable Costs",
"Total Costs",
"Total"
)
val yData = Seq(400, 660, 660, 590, 400, 400, 340)
val textList = Seq("$430K", "$260K", "$690K", "$-120K", "$-200K", "$-320K", "$370K")
//Base
val trace1 = Bar(
x = xData,
y = Seq(0, 430, 0, 570, 370, 370, 0),
marker = Marker(
color = Color.RGBA(1, 1, 1, 0.0)
)
)
//Revenue
val trace2 = Bar(
xData,
Seq(430, 260, 690, 0, 0, 0, 0),
marker = Marker(
color = Color.RGBA(55, 128, 191, 0.7),
line = Line(
color = Color.RGBA(55, 128, 191, 1.0),
width = 2.0
)
)
)
//Cost
val trace3 = Bar(
xData,
Seq(0, 0, 0, 120, 200, 320, 0),
marker = Marker(
color = Color.RGBA(219, 64, 82, 0.7),
line = Line(
color = Color.RGBA(219, 64, 82, 1.0),
width = 2.0
)
)
)
//Profit
val trace4 = Bar(
xData,
Seq(0, 0, 0, 0, 0, 0, 370),
marker = Marker(
color = Color.RGBA(50,171, 96, 0.7),
line = Line(
color = Color.RGBA(50, 171, 96, 1.0),
width = 2.0
)
)
)
val data = Seq(trace1, trace2, trace3, trace4)
val annotations = xData.zip(yData).zip(textList).map {
case ((x, y), text) =>
Annotation(
x = x,
y = y,
text = text,
font = Font(
family = "Arial",
size = 14,
color = Color.RGBA(245, 246, 249, 1)
),
showarrow = false
)
}
val layout = Layout(
title = "Annual Profit 2015",
barmode = BarMode.Stack,
paper_bgcolor = Color.RGBA(245, 246, 249, 1),
plot_bgcolor = Color.RGBA(245, 246, 249, 1),
width = 600,
height = 400,
showlegend = false,
annotations = annotations
)
plot(data, layout)
xData: Seq[String] = List( "Product Revenue", "Services Revenue", "Total Revenue", "Fixed Costs", "Variable Costs", "Total Costs", "Total" ) yData: Seq[Int] = List(400, 660, 660, 590, 400, 400, 340) textList: Seq[String] = List( "$430K", "$260K", "$690K", "$-120K", "$-200K", "$-320K", "$370K" ) trace1: Bar = Bar( Strings( List( "Product Revenue", "Services Revenue", "Total Revenue", "Fixed Costs", "Variable Costs", "Total Costs", "Total" ) ), Doubles(List(0.0, 430.0, 0.0, 570.0, 370.0, 370.0, 0.0)), None, None, Some( Marker( None, Some(One(RGBA(1, 1, 1, 0.0))), None, None, None, None, None, None, None ) ), None, None, None, None, None, None, None, None, None, None ) trace2: Bar = Bar( Strings( List( "Product Revenue", "Services Revenue", "Total Revenue", "Fixed Costs", "Variable Costs", "Total Costs", "Total" ) ), Doubles(List(430.0, 260.0, 690.0, 0.0, 0.0, 0.0, 0.0)), None, None, Some( Marker( None, Some(One(RGBA(55, 128, 191, 0.7))), None, Some( Line( None, Some(One(RGBA(55, 128, 191, 1.0))), Some(One(2.0)), None, None, None ) ), None, None, None, None, None ) ), None, None, ... trace3: Bar = Bar( Strings( List( "Product Revenue", "Services Revenue", "Total Revenue", "Fixed Costs", "Variable Costs", "Total Costs", "Total" ) ), Doubles(List(0.0, 0.0, 0.0, 120.0, 200.0, 320.0, 0.0)), None, None, Some( Marker( None, Some(One(RGBA(219, 64, 82, 0.7))), None, Some( Line( None, Some(One(RGBA(219, 64, 82, 1.0))), Some(One(2.0)), None, None, None ) ), None, None, None, None, None ) ), None, None, ... trace4: Bar = Bar( Strings( List( "Product Revenue", "Services Revenue", "Total Revenue", "Fixed Costs", "Variable Costs", "Total Costs", "Total" ) ), Doubles(List(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 370.0)), None, None, Some( Marker( None, Some(One(RGBA(50, 171, 96, 0.7))), None, Some( Line( None, Some(One(RGBA(50, 171, 96, 1.0))), Some(One(2.0)), None, None, None ) ), None, None, None, None, None ) ), None, None, ... data: Seq[Bar] = List( Bar( Strings( List( "Product Revenue", "Services Revenue", "Total Revenue", "Fixed Costs", "Variable Costs", "Total Costs", "Total" ) ), Doubles(List(0.0, 430.0, 0.0, 570.0, 370.0, 370.0, 0.0)), None, None, Some( Marker( None, Some(One(RGBA(1, 1, 1, 0.0))), None, None, None, None, None, None, None ) ), None, None, None, None, None, None, None, None, None, None ... annotations: Seq[Annotation] = List( Annotation( None, None, Some(StringElement("Product Revenue")), Some(DoubleElement(400.0)), None, None, Some(StringElement("$430K")), Some(Font(Some(14), Some("Arial"), Some(RGBA(245, 246, 249, 1.0)))), Some(false) ), Annotation( None, None, Some(StringElement("Services Revenue")), Some(DoubleElement(660.0)), None, None, Some(StringElement("$260K")), Some(Font(Some(14), Some("Arial"), Some(RGBA(245, 246, 249, 1.0)))), Some(false) ), Annotation( None, None, Some(StringElement("Total Revenue")), Some(DoubleElement(660.0)), None, None, Some(StringElement("$690K")), Some(Font(Some(14), Some("Arial"), Some(RGBA(245, 246, 249, 1.0)))), Some(false) ), Annotation( None, None, Some(StringElement("Fixed Costs")), Some(DoubleElement(590.0)), ... layout: Layout = Layout( Some("Annual Profit 2015"), None, Some(600), Some(400), Some(false), None, None, None, None, None, None, None, None, None, None, Some(Stack), None, None, Some( List( Annotation( None, None, Some(StringElement("Product Revenue")), Some(DoubleElement(400.0)), None, None, Some(StringElement("$430K")), Some(Font(Some(14), Some("Arial"), Some(RGBA(245, 246, 249, 1.0)))), Some(false) ), Annotation( None, None, Some(StringElement("Services Revenue")), Some(DoubleElement(660.0)), None, None, ... res8_10: String = "plot-687002119"
val data = Seq(Bar(
Seq(20, 14, 23),
Seq("giraffes", "orangutans", "monkeys"),
orientation = Orientation.Horizontal
))
plot(data)
data: Seq[Bar] = List( Bar( Doubles(List(20.0, 14.0, 23.0)), Strings(List("giraffes", "orangutans", "monkeys")), None, None, None, Some(Horizontal), None, None, None, None, None, None, None, None, None ) ) res9_1: String = "plot-485959778"
val trace1 = Bar(
Seq(20, 14, 23),
Seq("giraffes", "orangutans", "monkeys"),
name = "SF Zoo",
orientation = Orientation.Horizontal,
marker = Marker(
color = Color.RGBA(55, 128, 191, 0.6),
width = 1
)
)
val trace2 = Bar(
Seq(12, 18, 29),
Seq("giraffes", "orangutans", "monkeys"),
name = "LA Zoo",
orientation = Orientation.Horizontal,
marker = Marker(
color = Color.RGBA(255, 153, 51, 0.6),
width = 1
)
)
val data = Seq(trace1, trace2)
val layout = Layout(
title = "Colored Bar Chart",
barmode = BarMode.Stack
)
plot(data, layout)
trace1: Bar = Bar( Doubles(List(20.0, 14.0, 23.0)), Strings(List("giraffes", "orangutans", "monkeys")), Some("SF Zoo"), None, Some( Marker( None, Some(One(RGBA(55, 128, 191, 0.6))), None, None, None, None, None, None, Some(One(1)) ) ), Some(Horizontal), None, None, None, None, None, None, None, None, None ) trace2: Bar = Bar( Doubles(List(12.0, 18.0, 29.0)), Strings(List("giraffes", "orangutans", "monkeys")), Some("LA Zoo"), None, Some( Marker( None, Some(One(RGBA(255, 153, 51, 0.6))), None, None, None, None, None, None, Some(One(1)) ) ), Some(Horizontal), None, None, None, None, None, None, None, None, None ) data: Seq[Bar] = List( Bar( Doubles(List(20.0, 14.0, 23.0)), Strings(List("giraffes", "orangutans", "monkeys")), Some("SF Zoo"), None, Some( Marker( None, Some(One(RGBA(55, 128, 191, 0.6))), None, None, None, None, None, None, Some(One(1)) ) ), Some(Horizontal), None, None, None, None, None, None, None, None, None ), Bar( Doubles(List(12.0, 18.0, 29.0)), Strings(List("giraffes", "orangutans", "monkeys")), Some("LA Zoo"), None, Some( Marker( None, Some(One(RGBA(255, 153, 51, 0.6))), ... layout: Layout = Layout( Some("Colored Bar Chart"), None, None, None, None, None, None, None, None, None, None, None, None, None, None, Some(Stack), None, None, None, None, None, None, None, None, None, None ) res10_4: String = "plot-344621642"
val data = Seq(
Scatter(
Seq("2013-10-04 22:23:00", "2013-11-04 22:23:00", "2013-12-04 22:23:00"),
Seq(1, 3, 6)
)
)
plot(data)
data: Seq[Scatter] = List( Scatter( Some( Strings( List( "2013-10-04 22:23:00", "2013-11-04 22:23:00", "2013-12-04 22:23:00" ) ) ), Some(Doubles(List(1.0, 3.0, 6.0))), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None ) ) res11_1: String = "plot-832069438"
val trace1 = Scatter(
Seq(1, 2, 3, 4),
Seq(10, 11, 12, 13),
text = Seq("""A
size = 40""", """B
size = 60""", """C
size = 80""", """D
size = 100"""),
mode = ScatterMode(ScatterMode.Markers),
marker = Marker(
color = Seq(Color.RGB(93, 164, 214), Color.RGB(255, 144, 14), Color.RGB(44, 160, 101), Color.RGB(255, 65, 54)),
size = Seq(40, 60, 80, 100)
)
)
val data = Seq(trace1)
val layout = Layout(
title = "Bubble Chart Hover Text",
showlegend = false,
height = 400,
width = 600
)
plot(data, layout)
trace1: Scatter = Scatter( Some(Doubles(List(1.0, 2.0, 3.0, 4.0))), Some(Doubles(List(10.0, 11.0, 12.0, 13.0))), Some( Sequence( List( """A size = 40""", """B size = 60""", """C size = 80""", """D size = 100""" ) ) ), Some(ScatterMode(Set(Markers))), Some( Marker( Some(Sequence(List(40, 60, 80, 100))), Some( Sequence( List( RGB(93, 164, 214), RGB(255, 144, 14), RGB(44, 160, 101), RGB(255, 65, 54) ) ) ), None, None, None, None, None, None, None ) ... data: Seq[Scatter] = List( Scatter( Some(Doubles(List(1.0, 2.0, 3.0, 4.0))), Some(Doubles(List(10.0, 11.0, 12.0, 13.0))), Some( Sequence( List( """A size = 40""", """B size = 60""", """C size = 80""", """D size = 100""" ) ) ), Some(ScatterMode(Set(Markers))), Some( Marker( Some(Sequence(List(40, 60, 80, 100))), Some( Sequence( List( RGB(93, 164, 214), RGB(255, 144, 14), RGB(44, 160, 101), RGB(255, 65, 54) ) ) ), None, None, None, None, None, None, None ... layout: Layout = Layout( Some("Bubble Chart Hover Text"), None, Some(600), Some(400), Some(false), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None ) res12_3: String = "plot-625175960"
val trace1 = Scatter(
Seq(1, 2, 3, 4),
Seq(0, 2, 3, 5),
fill = Fill.ToZeroY
)
val trace2 = Scatter(
Seq(1, 2, 3, 4),
Seq(3, 5, 1, 7),
fill = Fill.ToNextY
)
val data = Seq(trace1, trace2)
plot(data)
trace1: Scatter = Scatter( Some(Doubles(List(1.0, 2.0, 3.0, 4.0))), Some(Doubles(List(0.0, 2.0, 3.0, 5.0))), None, None, None, None, None, None, None, None, None, None, Some(ToZeroY), None, None, None, None, None, None, None, None ) trace2: Scatter = Scatter( Some(Doubles(List(1.0, 2.0, 3.0, 4.0))), Some(Doubles(List(3.0, 5.0, 1.0, 7.0))), None, None, None, None, None, None, None, None, None, None, Some(ToNextY), None, None, None, None, None, None, None, None ) data: Seq[Scatter] = List( Scatter( Some(Doubles(List(1.0, 2.0, 3.0, 4.0))), Some(Doubles(List(0.0, 2.0, 3.0, 5.0))), None, None, None, None, None, None, None, None, None, None, Some(ToZeroY), None, None, None, None, None, None, None, None ), Scatter( Some(Doubles(List(1.0, 2.0, 3.0, 4.0))), Some(Doubles(List(3.0, 5.0, 1.0, 7.0))), None, None, None, None, None, None, None, None, None, None, Some(ToNextY), None, ... res13_3: String = "plot-608795673"