Log-log bubbles with a power-law trend
Scatter2D graphs are a fundamental visualization tool used to display the relationship between two numerical variables. Each data point is represented as a dot on a two-dimensional plane, where the x-coordinate and y-coordinate correspond to the values of the two variables. This allows for quick identification of trends, clusters, and outliers in the data. Applications range from scientific data analysis to business intelligence, making them highly versatile. Creating effective Scatter2D graphs involves careful consideration of axis scaling, labeling, and color-coding. Highlighting specific data points or regions can improve understanding. Interactive Scatter2D plots further enhance exploration, allowing users to zoom, pan, and select individual data points for detailed examination. Choosing appropriate visualization tools greatly impacts the ability to draw meaningful insights from data.
<html>
<head>
<!-- Include the CanvasXpress library in your HTML file -->
<link rel="stylesheet" href="https://www.canvasxpress.org/dist/canvasXpress.css" type="text/css"/>
<script src="https://www.canvasxpress.org/dist/canvasXpress.min.js"></script>
</head>
<body>
<!-- Create a canvas element for the chart with the desired dimensions -->
<div>
<canvas id="canvasId" width="600" height="600"></canvas>
</div>
<!-- Create a script to initialize the chart -->
<script>
// Use a data frame (2D-array) for the graph
var data =
// Create the configuration for the graph
var config = {
"graphType" : "Scatter2D",
"titleAlign" : "plot::0",
"subtitleAlign" : "plot::0",
"legendHorizontalJustification" : 0,
"legendJustifyTo" : "plot",
"sizeScale" : "area",
"sizeMax" : 40,
"showSizeLegend" : false,
"theme" : "paulTol",
"title" : "Lake size and nutrient loading",
"xAxis" : [
"Surface area (ha)"
],
"yAxis" : [
"Phosphorus load (kg P / ha / yr)"
],
"sizeBy" : "Mean depth (m)",
"colorBy" : "Group",
"colorScheme" : "User",
"colors" : [
"#EE6677",
"rgba(190,190,190,0.5)"
],
"xAxisTransform" : "log10",
"yAxisTransform" : "log10",
"xAxisTransformTicks" : true,
"yAxisTransformTicks" : true,
"setMinX" : 2,
"setMaxX" : 5.7,
"setMinY" : -1,
"setMaxY" : 3,
"showLegend" : false,
"xAxisTitle" : "Surface area (hectares)",
"yAxisTitle" : "Phosphorus load (kg P per ha per year)",
"showDecorations" : true,
"decorations" : {
"line" : [
{
"x" : 3.7634279935629373,
"color" : "#555",
"width" : 1,
"label" : "Median area: 5,800 ha",
"align" : "left"
},
{
"y" : 0.505149978319906,
"color" : "#555",
"width" : 1,
"label" : "Median load: 3.2 kg P/ha/yr",
"align" : "right"
}
],
"marker" : [
{
"type" : "text",
"variable" : "Lake Alder",
"sample" : [
"Surface area (ha)",
"Phosphorus load (kg P / ha / yr)"
],
"text" : "Alder",
"offsetX" : 0,
"offsetY" : 38,
"align" : "center"
},
{
"type" : "text",
"variable" : "Lake Brant",
"sample" : [
"Surface area (ha)",
"Phosphorus load (kg P / ha / yr)"
],
"text" : "Brant",
"offsetX" : 0,
"offsetY" : 24,
"align" : "center"
},
{
"type" : "text",
"variable" : "Lake Corvin",
"sample" : [
"Surface area (ha)",
"Phosphorus load (kg P / ha / yr)"
],
"text" : "Corvin",
"offsetX" : 0,
"offsetY" : -22,
"align" : "center"
},
{
"type" : "text",
"variable" : "Lake Dunmore",
"sample" : [
"Surface area (ha)",
"Phosphorus load (kg P / ha / yr)"
],
"text" : "Dunmore",
"offsetX" : 0,
"offsetY" : 18,
"align" : "center"
}
]
}
}
// Event used to create graph (optional)
var events = false
// Call the CanvasXpress function to create the graph
var cX = new CanvasXpress("canvasId", data, config, events);
</script>
</body>
</html>
<html>
<head>
<!-- Include the CanvasXpress library in your HTML file -->
<link rel="stylesheet" href="https://www.canvasxpress.org/dist/canvasXpress.css" type="text/css"/>
<script src="https://www.canvasxpress.org/dist/canvasXpress.min.js"></script>
</head>
<body>
<!-- Create a canvas element for the chart with the desired dimensions -->
<div>
<canvas id="canvasId" width="600" height="600"></canvas>
</div>
<!-- Create a script to initialize the chart -->
<script>
// Create the data for the graph
var data = {
"y" : {
"vars" : [
"Lake Alder",
"Lake Brant",
"Lake Corvin",
"Lake Dunmore",
"Lake 1",
"Lake 2",
"Lake 3",
"Lake 4",
"Lake 5",
"Lake 6",
"Lake 7",
"Lake 8",
"Lake 9",
"Lake 10",
"Lake 11",
"Lake 12",
"Lake 13",
"Lake 14",
"Lake 15",
"Lake 16",
"Lake 17",
"Lake 18",
"Lake 19",
"Lake 20",
"Lake 21",
"Lake 22",
"Lake 23",
"Lake 24",
"Lake 25",
"Lake 26",
"Lake 27",
"Lake 28",
"Lake 29",
"Lake 30",
"Lake 31",
"Lake 32",
"Lake 33",
"Lake 34",
"Lake 35",
"Lake 36",
"Lake 37",
"Lake 38",
"Lake 39",
"Lake 40",
"Lake 41",
"Lake 42",
"Lake 43",
"Lake 44",
"Lake 45",
"Lake 46",
"Lake 47",
"Lake 48",
"Lake 49",
"Lake 50",
"Lake 51",
"Lake 52",
"Lake 53",
"Lake 54",
"Lake 55",
"Lake 56",
"Lake 57",
"Lake 58",
"Lake 59",
"Lake 60",
"Lake 61",
"Lake 62",
"Lake 63",
"Lake 64",
"Lake 65",
"Lake 66",
"Lake 67",
"Lake 68",
"Lake 69",
"Lake 70",
"Lake 71",
"Lake 72",
"Lake 73",
"Lake 74",
"Lake 75",
"Lake 76",
"Lake 77",
"Lake 78",
"Lake 79",
"Lake 80",
"Lake 81",
"Lake 82",
"Lake 83",
"Lake 84",
"Lake 85",
"Lake 86",
"Lake 87",
"Lake 88",
"Lake 89",
"Lake 90",
"Lake 91",
"Lake 92",
"Lake 93",
"Lake 94",
"Lake 95",
"Lake 96",
"Lake 97",
"Lake 98",
"Lake 99",
"Lake 100",
"Lake 101",
"Lake 102",
"Lake 103",
"Lake 104",
"Lake 105",
"Lake 106",
"Lake 107",
"Lake 108",
"Lake 109",
"Lake 110",
"Lake 111",
"Lake 112",
"Lake 113",
"Lake 114",
"Lake 115",
"Lake 116",
"Lake 117",
"Lake 118",
"Lake 119",
"Lake 120"
],
"smps" : [
"Surface area (ha)",
"Phosphorus load (kg P / ha / yr)",
"Mean depth (m)"
],
"data" : [
[
120000,
90,
38
],
[
24000,
11,
28
],
[
6500,
190,
15
],
[
520,
6,
12
],
[
40.55,
0.47,
5.67
],
[
422.16,
2.1,
13.44
],
[
68325.07,
113.09,
8.26
],
[
37.97,
1.12,
7.67
],
[
28959.8,
27.48,
21.66
],
[
344015.49,
906.33,
8.91
],
[
109.5,
2.71,
10.58
],
[
682.17,
13.91,
11.18
],
[
137199.63,
242.98,
26.35
],
[
20789.35,
54.28,
17.52
],
[
138204.27,
300.14,
21.36
],
[
398.25,
5.66,
6.73
],
[
53711.46,
94.71,
28.89
],
[
40983.52,
25.96,
17.9
],
[
32005.61,
84.67,
3.58
],
[
17.71,
0.35,
3.02
],
[
5377.5,
28.96,
7.5
],
[
91.44,
1.28,
5.69
],
[
32.1,
0.92,
12.07
],
[
20401.15,
163.42,
21.88
],
[
9440.39,
19.89,
9.2
],
[
173.9,
5.45,
2.27
],
[
20129.23,
125.47,
30.96
],
[
5635.7,
51.6,
25.79
],
[
81812.3,
499.19,
25.53
],
[
8579.71,
35.97,
23.17
],
[
6767.36,
39.74,
24.21
],
[
127.74,
2.37,
3.07
],
[
68.86,
1.8,
7.29
],
[
30.05,
2.21,
11.98
],
[
4217.86,
12.01,
29.36
],
[
70.12,
0.65,
2.98
],
[
2325.83,
10.37,
15.55
],
[
18.94,
0.3,
6.95
],
[
2418.87,
29.3,
26.57
],
[
165958.76,
398.32,
18.19
],
[
623.09,
2.95,
7.55
],
[
3612.02,
48.81,
6.53
],
[
67536.6,
149.48,
25.46
],
[
37831.29,
54.58,
27.13
],
[
12935.33,
59.99,
23.63
],
[
85.46,
2.12,
5.72
],
[
3426.82,
17.39,
28.8
],
[
291.21,
16.18,
12.14
],
[
17373.84,
73.18,
6.93
],
[
95840.03,
408.68,
7.84
],
[
6556.48,
125.6,
10.38
],
[
208665.49,
736.23,
8.99
],
[
109769.63,
336.02,
15.15
],
[
1491.65,
6.67,
26.41
],
[
515.09,
3.8,
11.92
],
[
1672.01,
23.53,
8.9
],
[
5400.18,
51.55,
10.95
],
[
248177.76,
211.64,
2.28
],
[
255663.45,
273.9,
20.61
],
[
224552.98,
818.17,
14.19
],
[
28.33,
0.65,
2.6
],
[
19.25,
0.25,
11.36
],
[
218752.74,
527.93,
30.5
],
[
1075.18,
16.64,
25.6
],
[
25810.35,
136.21,
25.45
],
[
7582.12,
62.95,
16.82
],
[
2418.82,
18.31,
12.26
],
[
3013.02,
12.04,
28.69
],
[
37970.62,
151.94,
22.15
],
[
287.82,
1.83,
2.2
],
[
4342.68,
18.59,
8.43
],
[
9729.55,
96.26,
11.24
],
[
995.87,
3.04,
4.96
],
[
65.4,
1.55,
3.78
],
[
2942.19,
26.16,
18
],
[
5281.1,
58.81,
11.65
],
[
264.06,
4.55,
12.49
],
[
4843.72,
20.96,
29.27
],
[
13076.87,
37.08,
11.39
],
[
22.7,
1.39,
7.15
],
[
30631.58,
135.04,
20.57
],
[
28.16,
0.81,
10.34
],
[
456.83,
3.61,
5.91
],
[
322.94,
5.51,
5.13
],
[
11466.29,
49.25,
4.18
],
[
218493.38,
119.74,
14.76
],
[
787.49,
5.09,
13.92
],
[
4977.21,
46.61,
30.62
],
[
52.32,
1.04,
11.56
],
[
411.97,
5.69,
6.29
],
[
155.55,
2.24,
9.6
],
[
90082.66,
275.38,
14.95
],
[
261.74,
2.27,
8.53
],
[
40868.84,
145.57,
23.24
],
[
694.84,
6.13,
9.24
],
[
261.82,
3.29,
9.24
],
[
77391.31,
288.78,
15.89
],
[
24.17,
1.69,
4.19
],
[
776.53,
12.13,
13.17
],
[
56478.52,
135.07,
13.76
],
[
68691.81,
327.28,
2.55
],
[
41319.99,
125.12,
11.82
],
[
735.88,
15.15,
8.04
],
[
335047.73,
1046,
22.84
],
[
213084.64,
661.18,
20.79
],
[
203173.16,
312.82,
30.35
],
[
51.44,
0.49,
9.52
],
[
152.59,
1.89,
12.57
],
[
289680.94,
744.16,
17.73
],
[
4575.1,
69.72,
8.57
],
[
27973.89,
83.58,
14.46
],
[
295544.44,
472.18,
27.34
],
[
18.85,
0.28,
2.81
],
[
120175.03,
233.64,
31.15
],
[
815.21,
4.2,
2.62
],
[
184359,
840.57,
30.34
],
[
50.15,
1.33,
9.96
],
[
1550.17,
23.69,
31.36
],
[
152.45,
8.53,
2.8
],
[
7659.56,
59.4,
4.43
],
[
208091.12,
244.83,
7.2
],
[
369318.9,
963.61,
25.81
],
[
21238.31,
79.12,
2.28
],
[
1601.62,
8.69,
22.76
]
]
},
"z" : {
"Group" : [
"Highlighted",
"Highlighted",
"Highlighted",
"Highlighted",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes",
"Other lakes"
]
}
}
// Create the configuration for the graph
var config = {
"graphType" : "Scatter2D",
"titleAlign" : "plot::0",
"subtitleAlign" : "plot::0",
"legendHorizontalJustification" : 0,
"legendJustifyTo" : "plot",
"sizeScale" : "area",
"sizeMax" : 40,
"showSizeLegend" : false,
"theme" : "paulTol",
"title" : "Lake size and nutrient loading",
"xAxis" : [
"Surface area (ha)"
],
"yAxis" : [
"Phosphorus load (kg P / ha / yr)"
],
"sizeBy" : "Mean depth (m)",
"colorBy" : "Group",
"colorScheme" : "User",
"colors" : [
"#EE6677",
"rgba(190,190,190,0.5)"
],
"xAxisTransform" : "log10",
"yAxisTransform" : "log10",
"xAxisTransformTicks" : true,
"yAxisTransformTicks" : true,
"setMinX" : 2,
"setMaxX" : 5.7,
"setMinY" : -1,
"setMaxY" : 3,
"showLegend" : false,
"xAxisTitle" : "Surface area (hectares)",
"yAxisTitle" : "Phosphorus load (kg P per ha per year)",
"showDecorations" : true,
"decorations" : {
"line" : [
{
"x" : 3.7634279935629373,
"color" : "#555",
"width" : 1,
"label" : "Median area: 5,800 ha",
"align" : "left"
},
{
"y" : 0.505149978319906,
"color" : "#555",
"width" : 1,
"label" : "Median load: 3.2 kg P/ha/yr",
"align" : "right"
}
],
"marker" : [
{
"type" : "text",
"variable" : "Lake Alder",
"sample" : [
"Surface area (ha)",
"Phosphorus load (kg P / ha / yr)"
],
"text" : "Alder",
"offsetX" : 0,
"offsetY" : 38,
"align" : "center"
},
{
"type" : "text",
"variable" : "Lake Brant",
"sample" : [
"Surface area (ha)",
"Phosphorus load (kg P / ha / yr)"
],
"text" : "Brant",
"offsetX" : 0,
"offsetY" : 24,
"align" : "center"
},
{
"type" : "text",
"variable" : "Lake Corvin",
"sample" : [
"Surface area (ha)",
"Phosphorus load (kg P / ha / yr)"
],
"text" : "Corvin",
"offsetX" : 0,
"offsetY" : -22,
"align" : "center"
},
{
"type" : "text",
"variable" : "Lake Dunmore",
"sample" : [
"Surface area (ha)",
"Phosphorus load (kg P / ha / yr)"
],
"text" : "Dunmore",
"offsetX" : 0,
"offsetY" : 18,
"align" : "center"
}
]
}
}
// Event used to create graph (optional)
var events = false
// Call the CanvasXpress function to create the graph
var cX = new CanvasXpress("canvasId", data, config, events);
</script>
</body>
</html>
library(canvasXpress)
y=read.table("https://www.canvasxpress.org/data/r/cX-scatter2d29-dat.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
z=read.table("https://www.canvasxpress.org/data/r/cX-scatter2d29-var.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
canvasXpress(
data=y,
varAnnot=z,
colorBy="Group",
colorScheme="User",
colors=list("#EE6677", "rgba(190,190,190,0.5)"),
decorations=list(line=list(list(align="left", color="#555", label="Median area: 5,800 ha", width=1, x=3.7634279935629373), list(align="right", color="#555", label="Median load: 3.2 kg P/ha/yr", width=1, y=0.505149978319906)), marker=list(list(align="center", offsetX=0, offsetY=38, sample=list("Surface area (ha)", "Phosphorus load (kg P / ha / yr)"), text="Alder", type="text", variable="Lake Alder"), list(align="center", offsetX=0, offsetY=24, sample=list("Surface area (ha)", "Phosphorus load (kg P / ha / yr)"), text="Brant", type="text", variable="Lake Brant"), list(align="center", offsetX=0, offsetY=-22, sample=list("Surface area (ha)", "Phosphorus load (kg P / ha / yr)"), text="Corvin", type="text", variable="Lake Corvin"), list(align="center", offsetX=0, offsetY=18, sample=list("Surface area (ha)", "Phosphorus load (kg P / ha / yr)"), text="Dunmore", type="text", variable="Lake Dunmore"))),
graphType="Scatter2D",
legendHorizontalJustification=0,
legendJustifyTo="plot",
setMaxX=5.7,
setMaxY=3,
setMinX=2,
setMinY=-1,
showDecorations=TRUE,
showLegend=FALSE,
showSizeLegend=FALSE,
sizeBy="Mean depth (m)",
sizeMax=40,
sizeScale="area",
subtitleAlign="plot::0",
theme="paulTol",
title="Lake size and nutrient loading",
titleAlign="plot::0",
xAxis=list("Surface area (ha)"),
xAxisTitle="Surface area (hectares)",
xAxisTransform="log10",
xAxisTransformTicks=TRUE,
yAxis=list("Phosphorus load (kg P / ha / yr)"),
yAxisTitle="Phosphorus load (kg P per ha per year)",
yAxisTransform="log10",
yAxisTransformTicks=TRUE
)
from canvasxpress.canvas import CanvasXpress
from canvasxpress.plot import show_in_browser
if __name__ == "__main__":
# Define the chart with its data and configuration
chart: CanvasXpress = CanvasXpress(
render_to = "scatter2d29",
data = {
"y": {
"vars": ["Lake Alder", "Lake Brant", "Lake Corvin", "Lake Dunmore", "Lake 1", "Lake 2", "Lake 3", "Lake 4", "Lake 5", "Lake 6", "Lake 7", "Lake 8", "Lake 9", "Lake 10", "Lake 11", "Lake 12", "Lake 13", "Lake 14", "Lake 15", "Lake 16", "Lake 17", "Lake 18", "Lake 19", "Lake 20", "Lake 21", "Lake 22", "Lake 23", "Lake 24", "Lake 25", "Lake 26", "Lake 27", "Lake 28", "Lake 29", "Lake 30", "Lake 31", "Lake 32", "Lake 33", "Lake 34", "Lake 35", "Lake 36", "Lake 37", "Lake 38", "Lake 39", "Lake 40", "Lake 41", "Lake 42", "Lake 43", "Lake 44", "Lake 45", "Lake 46", "Lake 47", "Lake 48", "Lake 49", "Lake 50", "Lake 51", "Lake 52", "Lake 53", "Lake 54", "Lake 55", "Lake 56", "Lake 57", "Lake 58", "Lake 59", "Lake 60", "Lake 61", "Lake 62", "Lake 63", "Lake 64", "Lake 65", "Lake 66", "Lake 67", "Lake 68", "Lake 69", "Lake 70", "Lake 71", "Lake 72", "Lake 73", "Lake 74", "Lake 75", "Lake 76", "Lake 77", "Lake 78", "Lake 79", "Lake 80", "Lake 81", "Lake 82", "Lake 83", "Lake 84", "Lake 85", "Lake 86", "Lake 87", "Lake 88", "Lake 89", "Lake 90", "Lake 91", "Lake 92", "Lake 93", "Lake 94", "Lake 95", "Lake 96", "Lake 97", "Lake 98", "Lake 99", "Lake 100", "Lake 101", "Lake 102", "Lake 103", "Lake 104", "Lake 105", "Lake 106", "Lake 107", "Lake 108", "Lake 109", "Lake 110", "Lake 111", "Lake 112", "Lake 113", "Lake 114", "Lake 115", "Lake 116", "Lake 117", "Lake 118", "Lake 119", "Lake 120"],
"smps": ["Surface area (ha)", "Phosphorus load (kg P / ha / yr)", "Mean depth (m)"],
"data": [
[120000, 90, 38],
[24000, 11, 28],
[6500, 190, 15],
[520, 6, 12],
[40.55, 0.47, 5.67],
[422.16, 2.1, 13.44],
[68325.07, 113.09, 8.26],
[37.97, 1.12, 7.67],
[28959.8, 27.48, 21.66],
[344015.49, 906.33, 8.91],
[109.5, 2.71, 10.58],
[682.17, 13.91, 11.18],
[137199.63, 242.98, 26.35],
[20789.35, 54.28, 17.52],
[138204.27, 300.14, 21.36],
[398.25, 5.66, 6.73],
[53711.46, 94.71, 28.89],
[40983.52, 25.96, 17.9],
[32005.61, 84.67, 3.58],
[17.71, 0.35, 3.02],
[5377.5, 28.96, 7.5],
[91.44, 1.28, 5.69],
[32.1, 0.92, 12.07],
[20401.15, 163.42, 21.88],
[9440.39, 19.89, 9.2],
[173.9, 5.45, 2.27],
[20129.23, 125.47, 30.96],
[5635.7, 51.6, 25.79],
[81812.3, 499.19, 25.53],
[8579.71, 35.97, 23.17],
[6767.36, 39.74, 24.21],
[127.74, 2.37, 3.07],
[68.86, 1.8, 7.29],
[30.05, 2.21, 11.98],
[4217.86, 12.01, 29.36],
[70.12, 0.65, 2.98],
[2325.83, 10.37, 15.55],
[18.94, 0.3, 6.95],
[2418.87, 29.3, 26.57],
[165958.76, 398.32, 18.19],
[623.09, 2.95, 7.55],
[3612.02, 48.81, 6.53],
[67536.6, 149.48, 25.46],
[37831.29, 54.58, 27.13],
[12935.33, 59.99, 23.63],
[85.46, 2.12, 5.72],
[3426.82, 17.39, 28.8],
[291.21, 16.18, 12.14],
[17373.84, 73.18, 6.93],
[95840.03, 408.68, 7.84],
[6556.48, 125.6, 10.38],
[208665.49, 736.23, 8.99],
[109769.63, 336.02, 15.15],
[1491.65, 6.67, 26.41],
[515.09, 3.8, 11.92],
[1672.01, 23.53, 8.9],
[5400.18, 51.55, 10.95],
[248177.76, 211.64, 2.28],
[255663.45, 273.9, 20.61],
[224552.98, 818.17, 14.19],
[28.33, 0.65, 2.6],
[19.25, 0.25, 11.36],
[218752.74, 527.93, 30.5],
[1075.18, 16.64, 25.6],
[25810.35, 136.21, 25.45],
[7582.12, 62.95, 16.82],
[2418.82, 18.31, 12.26],
[3013.02, 12.04, 28.69],
[37970.62, 151.94, 22.15],
[287.82, 1.83, 2.2],
[4342.68, 18.59, 8.43],
[9729.55, 96.26, 11.24],
[995.87, 3.04, 4.96],
[65.4, 1.55, 3.78],
[2942.19, 26.16, 18],
[5281.1, 58.81, 11.65],
[264.06, 4.55, 12.49],
[4843.72, 20.96, 29.27],
[13076.87, 37.08, 11.39],
[22.7, 1.39, 7.15],
[30631.58, 135.04, 20.57],
[28.16, 0.81, 10.34],
[456.83, 3.61, 5.91],
[322.94, 5.51, 5.13],
[11466.29, 49.25, 4.18],
[218493.38, 119.74, 14.76],
[787.49, 5.09, 13.92],
[4977.21, 46.61, 30.62],
[52.32, 1.04, 11.56],
[411.97, 5.69, 6.29],
[155.55, 2.24, 9.6],
[90082.66, 275.38, 14.95],
[261.74, 2.27, 8.53],
[40868.84, 145.57, 23.24],
[694.84, 6.13, 9.24],
[261.82, 3.29, 9.24],
[77391.31, 288.78, 15.89],
[24.17, 1.69, 4.19],
[776.53, 12.13, 13.17],
[56478.52, 135.07, 13.76],
[68691.81, 327.28, 2.55],
[41319.99, 125.12, 11.82],
[735.88, 15.15, 8.04],
[335047.73, 1046, 22.84],
[213084.64, 661.18, 20.79],
[203173.16, 312.82, 30.35],
[51.44, 0.49, 9.52],
[152.59, 1.89, 12.57],
[289680.94, 744.16, 17.73],
[4575.1, 69.72, 8.57],
[27973.89, 83.58, 14.46],
[295544.44, 472.18, 27.34],
[18.85, 0.28, 2.81],
[120175.03, 233.64, 31.15],
[815.21, 4.2, 2.62],
[184359, 840.57, 30.34],
[50.15, 1.33, 9.96],
[1550.17, 23.69, 31.36],
[152.45, 8.53, 2.8],
[7659.56, 59.4, 4.43],
[208091.12, 244.83, 7.2],
[369318.9, 963.61, 25.81],
[21238.31, 79.12, 2.28],
[1601.62, 8.69, 22.76]
]
},
"z": {
"Group": ["Highlighted", "Highlighted", "Highlighted", "Highlighted", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes"]
}
},
config = {
"graphType": "Scatter2D",
"titleAlign": "plot::0",
"subtitleAlign": "plot::0",
"legendHorizontalJustification": 0,
"legendJustifyTo": "plot",
"sizeScale": "area",
"sizeMax": 40,
"showSizeLegend": False,
"theme": "paulTol",
"title": "Lake size and nutrient loading",
"xAxis": ["Surface area (ha)"],
"yAxis": ["Phosphorus load (kg P / ha / yr)"],
"sizeBy": "Mean depth (m)",
"colorBy": "Group",
"colorScheme": "User",
"colors": ["#EE6677", "rgba(190,190,190,0.5)"],
"xAxisTransform": "log10",
"yAxisTransform": "log10",
"xAxisTransformTicks": True,
"yAxisTransformTicks": True,
"setMinX": 2,
"setMaxX": 5.7,
"setMinY": -1,
"setMaxY": 3,
"showLegend": False,
"xAxisTitle": "Surface area (hectares)",
"yAxisTitle": "Phosphorus load (kg P per ha per year)",
"showDecorations": True,
"decorations": {
"line": [
{
"x": 3.7634279935629373,
"color": "#555",
"width": 1,
"label": "Median area: 5,800 ha",
"align": "left"
},
{
"y": 0.505149978319906,
"color": "#555",
"width": 1,
"label": "Median load: 3.2 kg P/ha/yr",
"align": "right"
}
],
"marker": [
{
"type": "text",
"variable": "Lake Alder",
"sample": ["Surface area (ha)", "Phosphorus load (kg P / ha / yr)"],
"text": "Alder",
"offsetX": 0,
"offsetY": 38,
"align": "center"
},
{
"type": "text",
"variable": "Lake Brant",
"sample": ["Surface area (ha)", "Phosphorus load (kg P / ha / yr)"],
"text": "Brant",
"offsetX": 0,
"offsetY": 24,
"align": "center"
},
{
"type": "text",
"variable": "Lake Corvin",
"sample": ["Surface area (ha)", "Phosphorus load (kg P / ha / yr)"],
"text": "Corvin",
"offsetX": 0,
"offsetY": -22,
"align": "center"
},
{
"type": "text",
"variable": "Lake Dunmore",
"sample": ["Surface area (ha)", "Phosphorus load (kg P / ha / yr)"],
"text": "Dunmore",
"offsetX": 0,
"offsetY": 18,
"align": "center"
}
]
}
},
width = 760,
height = 600
)
# Display the chart in its own Web page
show_in_browser(chart)
from canvasxpress.canvas import CanvasXpress
from canvasxpress.plot import graph
graph(
CanvasXpress(
render_to = "scatter2d29",
data = {
"y": {
"vars": ["Lake Alder", "Lake Brant", "Lake Corvin", "Lake Dunmore", "Lake 1", "Lake 2", "Lake 3", "Lake 4", "Lake 5", "Lake 6", "Lake 7", "Lake 8", "Lake 9", "Lake 10", "Lake 11", "Lake 12", "Lake 13", "Lake 14", "Lake 15", "Lake 16", "Lake 17", "Lake 18", "Lake 19", "Lake 20", "Lake 21", "Lake 22", "Lake 23", "Lake 24", "Lake 25", "Lake 26", "Lake 27", "Lake 28", "Lake 29", "Lake 30", "Lake 31", "Lake 32", "Lake 33", "Lake 34", "Lake 35", "Lake 36", "Lake 37", "Lake 38", "Lake 39", "Lake 40", "Lake 41", "Lake 42", "Lake 43", "Lake 44", "Lake 45", "Lake 46", "Lake 47", "Lake 48", "Lake 49", "Lake 50", "Lake 51", "Lake 52", "Lake 53", "Lake 54", "Lake 55", "Lake 56", "Lake 57", "Lake 58", "Lake 59", "Lake 60", "Lake 61", "Lake 62", "Lake 63", "Lake 64", "Lake 65", "Lake 66", "Lake 67", "Lake 68", "Lake 69", "Lake 70", "Lake 71", "Lake 72", "Lake 73", "Lake 74", "Lake 75", "Lake 76", "Lake 77", "Lake 78", "Lake 79", "Lake 80", "Lake 81", "Lake 82", "Lake 83", "Lake 84", "Lake 85", "Lake 86", "Lake 87", "Lake 88", "Lake 89", "Lake 90", "Lake 91", "Lake 92", "Lake 93", "Lake 94", "Lake 95", "Lake 96", "Lake 97", "Lake 98", "Lake 99", "Lake 100", "Lake 101", "Lake 102", "Lake 103", "Lake 104", "Lake 105", "Lake 106", "Lake 107", "Lake 108", "Lake 109", "Lake 110", "Lake 111", "Lake 112", "Lake 113", "Lake 114", "Lake 115", "Lake 116", "Lake 117", "Lake 118", "Lake 119", "Lake 120"],
"smps": ["Surface area (ha)", "Phosphorus load (kg P / ha / yr)", "Mean depth (m)"],
"data": [
[120000, 90, 38],
[24000, 11, 28],
[6500, 190, 15],
[520, 6, 12],
[40.55, 0.47, 5.67],
[422.16, 2.1, 13.44],
[68325.07, 113.09, 8.26],
[37.97, 1.12, 7.67],
[28959.8, 27.48, 21.66],
[344015.49, 906.33, 8.91],
[109.5, 2.71, 10.58],
[682.17, 13.91, 11.18],
[137199.63, 242.98, 26.35],
[20789.35, 54.28, 17.52],
[138204.27, 300.14, 21.36],
[398.25, 5.66, 6.73],
[53711.46, 94.71, 28.89],
[40983.52, 25.96, 17.9],
[32005.61, 84.67, 3.58],
[17.71, 0.35, 3.02],
[5377.5, 28.96, 7.5],
[91.44, 1.28, 5.69],
[32.1, 0.92, 12.07],
[20401.15, 163.42, 21.88],
[9440.39, 19.89, 9.2],
[173.9, 5.45, 2.27],
[20129.23, 125.47, 30.96],
[5635.7, 51.6, 25.79],
[81812.3, 499.19, 25.53],
[8579.71, 35.97, 23.17],
[6767.36, 39.74, 24.21],
[127.74, 2.37, 3.07],
[68.86, 1.8, 7.29],
[30.05, 2.21, 11.98],
[4217.86, 12.01, 29.36],
[70.12, 0.65, 2.98],
[2325.83, 10.37, 15.55],
[18.94, 0.3, 6.95],
[2418.87, 29.3, 26.57],
[165958.76, 398.32, 18.19],
[623.09, 2.95, 7.55],
[3612.02, 48.81, 6.53],
[67536.6, 149.48, 25.46],
[37831.29, 54.58, 27.13],
[12935.33, 59.99, 23.63],
[85.46, 2.12, 5.72],
[3426.82, 17.39, 28.8],
[291.21, 16.18, 12.14],
[17373.84, 73.18, 6.93],
[95840.03, 408.68, 7.84],
[6556.48, 125.6, 10.38],
[208665.49, 736.23, 8.99],
[109769.63, 336.02, 15.15],
[1491.65, 6.67, 26.41],
[515.09, 3.8, 11.92],
[1672.01, 23.53, 8.9],
[5400.18, 51.55, 10.95],
[248177.76, 211.64, 2.28],
[255663.45, 273.9, 20.61],
[224552.98, 818.17, 14.19],
[28.33, 0.65, 2.6],
[19.25, 0.25, 11.36],
[218752.74, 527.93, 30.5],
[1075.18, 16.64, 25.6],
[25810.35, 136.21, 25.45],
[7582.12, 62.95, 16.82],
[2418.82, 18.31, 12.26],
[3013.02, 12.04, 28.69],
[37970.62, 151.94, 22.15],
[287.82, 1.83, 2.2],
[4342.68, 18.59, 8.43],
[9729.55, 96.26, 11.24],
[995.87, 3.04, 4.96],
[65.4, 1.55, 3.78],
[2942.19, 26.16, 18],
[5281.1, 58.81, 11.65],
[264.06, 4.55, 12.49],
[4843.72, 20.96, 29.27],
[13076.87, 37.08, 11.39],
[22.7, 1.39, 7.15],
[30631.58, 135.04, 20.57],
[28.16, 0.81, 10.34],
[456.83, 3.61, 5.91],
[322.94, 5.51, 5.13],
[11466.29, 49.25, 4.18],
[218493.38, 119.74, 14.76],
[787.49, 5.09, 13.92],
[4977.21, 46.61, 30.62],
[52.32, 1.04, 11.56],
[411.97, 5.69, 6.29],
[155.55, 2.24, 9.6],
[90082.66, 275.38, 14.95],
[261.74, 2.27, 8.53],
[40868.84, 145.57, 23.24],
[694.84, 6.13, 9.24],
[261.82, 3.29, 9.24],
[77391.31, 288.78, 15.89],
[24.17, 1.69, 4.19],
[776.53, 12.13, 13.17],
[56478.52, 135.07, 13.76],
[68691.81, 327.28, 2.55],
[41319.99, 125.12, 11.82],
[735.88, 15.15, 8.04],
[335047.73, 1046, 22.84],
[213084.64, 661.18, 20.79],
[203173.16, 312.82, 30.35],
[51.44, 0.49, 9.52],
[152.59, 1.89, 12.57],
[289680.94, 744.16, 17.73],
[4575.1, 69.72, 8.57],
[27973.89, 83.58, 14.46],
[295544.44, 472.18, 27.34],
[18.85, 0.28, 2.81],
[120175.03, 233.64, 31.15],
[815.21, 4.2, 2.62],
[184359, 840.57, 30.34],
[50.15, 1.33, 9.96],
[1550.17, 23.69, 31.36],
[152.45, 8.53, 2.8],
[7659.56, 59.4, 4.43],
[208091.12, 244.83, 7.2],
[369318.9, 963.61, 25.81],
[21238.31, 79.12, 2.28],
[1601.62, 8.69, 22.76]
]
},
"z": {
"Group": ["Highlighted", "Highlighted", "Highlighted", "Highlighted", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes"]
}
},
config = {
"graphType": "Scatter2D",
"titleAlign": "plot::0",
"subtitleAlign": "plot::0",
"legendHorizontalJustification": 0,
"legendJustifyTo": "plot",
"sizeScale": "area",
"sizeMax": 40,
"showSizeLegend": False,
"theme": "paulTol",
"title": "Lake size and nutrient loading",
"xAxis": ["Surface area (ha)"],
"yAxis": ["Phosphorus load (kg P / ha / yr)"],
"sizeBy": "Mean depth (m)",
"colorBy": "Group",
"colorScheme": "User",
"colors": ["#EE6677", "rgba(190,190,190,0.5)"],
"xAxisTransform": "log10",
"yAxisTransform": "log10",
"xAxisTransformTicks": True,
"yAxisTransformTicks": True,
"setMinX": 2,
"setMaxX": 5.7,
"setMinY": -1,
"setMaxY": 3,
"showLegend": False,
"xAxisTitle": "Surface area (hectares)",
"yAxisTitle": "Phosphorus load (kg P per ha per year)",
"showDecorations": True,
"decorations": {
"line": [
{
"x": 3.7634279935629373,
"color": "#555",
"width": 1,
"label": "Median area: 5,800 ha",
"align": "left"
},
{
"y": 0.505149978319906,
"color": "#555",
"width": 1,
"label": "Median load: 3.2 kg P/ha/yr",
"align": "right"
}
],
"marker": [
{
"type": "text",
"variable": "Lake Alder",
"sample": ["Surface area (ha)", "Phosphorus load (kg P / ha / yr)"],
"text": "Alder",
"offsetX": 0,
"offsetY": 38,
"align": "center"
},
{
"type": "text",
"variable": "Lake Brant",
"sample": ["Surface area (ha)", "Phosphorus load (kg P / ha / yr)"],
"text": "Brant",
"offsetX": 0,
"offsetY": 24,
"align": "center"
},
{
"type": "text",
"variable": "Lake Corvin",
"sample": ["Surface area (ha)", "Phosphorus load (kg P / ha / yr)"],
"text": "Corvin",
"offsetX": 0,
"offsetY": -22,
"align": "center"
},
{
"type": "text",
"variable": "Lake Dunmore",
"sample": ["Surface area (ha)", "Phosphorus load (kg P / ha / yr)"],
"text": "Dunmore",
"offsetX": 0,
"offsetY": 18,
"align": "center"
}
]
}
},
width = 760,
height = 600
)
)
using CanvasXpress
canvasxpress(Dict(
"y" => Dict(
"vars" => ["Lake Alder", "Lake Brant", "Lake Corvin", "Lake Dunmore", "Lake 1", "Lake 2", "Lake 3", "Lake 4", "Lake 5", "Lake 6", "Lake 7", "Lake 8", "Lake 9", "Lake 10", "Lake 11", "Lake 12", "Lake 13", "Lake 14", "Lake 15", "Lake 16", "Lake 17", "Lake 18", "Lake 19", "Lake 20", "Lake 21", "Lake 22", "Lake 23", "Lake 24", "Lake 25", "Lake 26", "Lake 27", "Lake 28", "Lake 29", "Lake 30", "Lake 31", "Lake 32", "Lake 33", "Lake 34", "Lake 35", "Lake 36", "Lake 37", "Lake 38", "Lake 39", "Lake 40", "Lake 41", "Lake 42", "Lake 43", "Lake 44", "Lake 45", "Lake 46", "Lake 47", "Lake 48", "Lake 49", "Lake 50", "Lake 51", "Lake 52", "Lake 53", "Lake 54", "Lake 55", "Lake 56", "Lake 57", "Lake 58", "Lake 59", "Lake 60", "Lake 61", "Lake 62", "Lake 63", "Lake 64", "Lake 65", "Lake 66", "Lake 67", "Lake 68", "Lake 69", "Lake 70", "Lake 71", "Lake 72", "Lake 73", "Lake 74", "Lake 75", "Lake 76", "Lake 77", "Lake 78", "Lake 79", "Lake 80", "Lake 81", "Lake 82", "Lake 83", "Lake 84", "Lake 85", "Lake 86", "Lake 87", "Lake 88", "Lake 89", "Lake 90", "Lake 91", "Lake 92", "Lake 93", "Lake 94", "Lake 95", "Lake 96", "Lake 97", "Lake 98", "Lake 99", "Lake 100", "Lake 101", "Lake 102", "Lake 103", "Lake 104", "Lake 105", "Lake 106", "Lake 107", "Lake 108", "Lake 109", "Lake 110", "Lake 111", "Lake 112", "Lake 113", "Lake 114", "Lake 115", "Lake 116", "Lake 117", "Lake 118", "Lake 119", "Lake 120"],
"smps" => ["Surface area (ha)", "Phosphorus load (kg P / ha / yr)", "Mean depth (m)"],
"data" => [
[120000, 90, 38],
[24000, 11, 28],
[6500, 190, 15],
[520, 6, 12],
[40.55, 0.47, 5.67],
[422.16, 2.1, 13.44],
[68325.07, 113.09, 8.26],
[37.97, 1.12, 7.67],
[28959.8, 27.48, 21.66],
[344015.49, 906.33, 8.91],
[109.5, 2.71, 10.58],
[682.17, 13.91, 11.18],
[137199.63, 242.98, 26.35],
[20789.35, 54.28, 17.52],
[138204.27, 300.14, 21.36],
[398.25, 5.66, 6.73],
[53711.46, 94.71, 28.89],
[40983.52, 25.96, 17.9],
[32005.61, 84.67, 3.58],
[17.71, 0.35, 3.02],
[5377.5, 28.96, 7.5],
[91.44, 1.28, 5.69],
[32.1, 0.92, 12.07],
[20401.15, 163.42, 21.88],
[9440.39, 19.89, 9.2],
[173.9, 5.45, 2.27],
[20129.23, 125.47, 30.96],
[5635.7, 51.6, 25.79],
[81812.3, 499.19, 25.53],
[8579.71, 35.97, 23.17],
[6767.36, 39.74, 24.21],
[127.74, 2.37, 3.07],
[68.86, 1.8, 7.29],
[30.05, 2.21, 11.98],
[4217.86, 12.01, 29.36],
[70.12, 0.65, 2.98],
[2325.83, 10.37, 15.55],
[18.94, 0.3, 6.95],
[2418.87, 29.3, 26.57],
[165958.76, 398.32, 18.19],
[623.09, 2.95, 7.55],
[3612.02, 48.81, 6.53],
[67536.6, 149.48, 25.46],
[37831.29, 54.58, 27.13],
[12935.33, 59.99, 23.63],
[85.46, 2.12, 5.72],
[3426.82, 17.39, 28.8],
[291.21, 16.18, 12.14],
[17373.84, 73.18, 6.93],
[95840.03, 408.68, 7.84],
[6556.48, 125.6, 10.38],
[208665.49, 736.23, 8.99],
[109769.63, 336.02, 15.15],
[1491.65, 6.67, 26.41],
[515.09, 3.8, 11.92],
[1672.01, 23.53, 8.9],
[5400.18, 51.55, 10.95],
[248177.76, 211.64, 2.28],
[255663.45, 273.9, 20.61],
[224552.98, 818.17, 14.19],
[28.33, 0.65, 2.6],
[19.25, 0.25, 11.36],
[218752.74, 527.93, 30.5],
[1075.18, 16.64, 25.6],
[25810.35, 136.21, 25.45],
[7582.12, 62.95, 16.82],
[2418.82, 18.31, 12.26],
[3013.02, 12.04, 28.69],
[37970.62, 151.94, 22.15],
[287.82, 1.83, 2.2],
[4342.68, 18.59, 8.43],
[9729.55, 96.26, 11.24],
[995.87, 3.04, 4.96],
[65.4, 1.55, 3.78],
[2942.19, 26.16, 18],
[5281.1, 58.81, 11.65],
[264.06, 4.55, 12.49],
[4843.72, 20.96, 29.27],
[13076.87, 37.08, 11.39],
[22.7, 1.39, 7.15],
[30631.58, 135.04, 20.57],
[28.16, 0.81, 10.34],
[456.83, 3.61, 5.91],
[322.94, 5.51, 5.13],
[11466.29, 49.25, 4.18],
[218493.38, 119.74, 14.76],
[787.49, 5.09, 13.92],
[4977.21, 46.61, 30.62],
[52.32, 1.04, 11.56],
[411.97, 5.69, 6.29],
[155.55, 2.24, 9.6],
[90082.66, 275.38, 14.95],
[261.74, 2.27, 8.53],
[40868.84, 145.57, 23.24],
[694.84, 6.13, 9.24],
[261.82, 3.29, 9.24],
[77391.31, 288.78, 15.89],
[24.17, 1.69, 4.19],
[776.53, 12.13, 13.17],
[56478.52, 135.07, 13.76],
[68691.81, 327.28, 2.55],
[41319.99, 125.12, 11.82],
[735.88, 15.15, 8.04],
[335047.73, 1046, 22.84],
[213084.64, 661.18, 20.79],
[203173.16, 312.82, 30.35],
[51.44, 0.49, 9.52],
[152.59, 1.89, 12.57],
[289680.94, 744.16, 17.73],
[4575.1, 69.72, 8.57],
[27973.89, 83.58, 14.46],
[295544.44, 472.18, 27.34],
[18.85, 0.28, 2.81],
[120175.03, 233.64, 31.15],
[815.21, 4.2, 2.62],
[184359, 840.57, 30.34],
[50.15, 1.33, 9.96],
[1550.17, 23.69, 31.36],
[152.45, 8.53, 2.8],
[7659.56, 59.4, 4.43],
[208091.12, 244.83, 7.2],
[369318.9, 963.61, 25.81],
[21238.31, 79.12, 2.28],
[1601.62, 8.69, 22.76]
]
),
"z" => Dict(
"Group" => ["Highlighted", "Highlighted", "Highlighted", "Highlighted", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes", "Other lakes"]
)
);
graphType = "Scatter2D",
titleAlign = "plot::0",
subtitleAlign = "plot::0",
legendHorizontalJustification = 0,
legendJustifyTo = "plot",
sizeScale = "area",
sizeMax = 40,
showSizeLegend = false,
theme = "paulTol",
title = "Lake size and nutrient loading",
xAxis = ["Surface area (ha)"],
yAxis = ["Phosphorus load (kg P / ha / yr)"],
sizeBy = "Mean depth (m)",
colorBy = "Group",
colorScheme = "User",
colors = ["#EE6677", "rgba(190,190,190,0.5)"],
xAxisTransform = "log10",
yAxisTransform = "log10",
xAxisTransformTicks = true,
yAxisTransformTicks = true,
setMinX = 2,
setMaxX = 5.7,
setMinY = -1,
setMaxY = 3,
showLegend = false,
xAxisTitle = "Surface area (hectares)",
yAxisTitle = "Phosphorus load (kg P per ha per year)",
showDecorations = true,
decorations = Dict(
"line" => [
Dict(
"x" => 3.7634279935629373,
"color" => "#555",
"width" => 1,
"label" => "Median area: 5,800 ha",
"align" => "left"
),
Dict(
"y" => 0.505149978319906,
"color" => "#555",
"width" => 1,
"label" => "Median load: 3.2 kg P/ha/yr",
"align" => "right"
)
],
"marker" => [
Dict(
"type" => "text",
"variable" => "Lake Alder",
"sample" => ["Surface area (ha)", "Phosphorus load (kg P / ha / yr)"],
"text" => "Alder",
"offsetX" => 0,
"offsetY" => 38,
"align" => "center"
),
Dict(
"type" => "text",
"variable" => "Lake Brant",
"sample" => ["Surface area (ha)", "Phosphorus load (kg P / ha / yr)"],
"text" => "Brant",
"offsetX" => 0,
"offsetY" => 24,
"align" => "center"
),
Dict(
"type" => "text",
"variable" => "Lake Corvin",
"sample" => ["Surface area (ha)", "Phosphorus load (kg P / ha / yr)"],
"text" => "Corvin",
"offsetX" => 0,
"offsetY" => -22,
"align" => "center"
),
Dict(
"type" => "text",
"variable" => "Lake Dunmore",
"sample" => ["Surface area (ha)", "Phosphorus load (kg P / ha / yr)"],
"text" => "Dunmore",
"offsetX" => 0,
"offsetY" => 18,
"align" => "center"
)
]
)
)

































