Periodic-table dot grid coloured by category
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",
"theme" : "paulTol",
"title" : "Which elements are gases, liquids or solids?",
"xAxis" : [
"Group"
],
"yAxis" : [
"Period"
],
"colorBy" : "State",
"colorScheme" : "User",
"colors" : [
"#66CCEE",
"#228833",
"#EE6677",
"#CCBB44"
],
"dataPointSize" : 34,
"setMinX" : 0,
"setMaxX" : 19,
"setMinY" : 0,
"setMaxY" : 7,
"showLegend" : true,
"legendPosition" : "top",
"showLegendTitle" : false,
"xAxisShow" : false,
"yAxisShow" : false,
"xAxisGridMajorShow" : false,
"yAxisGridMajorShow" : false,
"xAxisGridMinorShow" : false,
"yAxisGridMinorShow" : false,
"xAxisTitle" : "",
"yAxisTitle" : "",
"showDecorations" : true,
"decorations" : {
"marker" : [
{
"type" : "text",
"variable" : "H",
"sample" : [
"Group",
"Period"
],
"text" : "H",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "He",
"sample" : [
"Group",
"Period"
],
"text" : "He",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "N",
"sample" : [
"Group",
"Period"
],
"text" : "N",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "O",
"sample" : [
"Group",
"Period"
],
"text" : "O",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "Br",
"sample" : [
"Group",
"Period"
],
"text" : "Br",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "Hg",
"sample" : [
"Group",
"Period"
],
"text" : "Hg",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "Tc",
"sample" : [
"Group",
"Period"
],
"text" : "Tc",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "Fe",
"sample" : [
"Group",
"Period"
],
"text" : "Fe",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "Au",
"sample" : [
"Group",
"Period"
],
"text" : "Au",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "Xe",
"sample" : [
"Group",
"Period"
],
"text" : "Xe",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "Rn",
"sample" : [
"Group",
"Period"
],
"text" : "Rn",
"offsetX" : 0,
"offsetY" : -28,
"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" : [
"H",
"He",
"Li",
"Be",
"B",
"C",
"N",
"O",
"F",
"Ne",
"Na",
"Mg",
"Al",
"Si",
"P",
"S",
"Cl",
"Ar",
"K",
"Ca",
"Sc",
"Ti",
"V",
"Cr",
"Mn",
"Fe",
"Co",
"Ni",
"Cu",
"Zn",
"Ga",
"Ge",
"As",
"Se",
"Br",
"Kr",
"Rb",
"Sr",
"Y",
"Zr",
"Nb",
"Mo",
"Tc",
"Ru",
"Rh",
"Pd",
"Ag",
"Cd",
"In",
"Sn",
"Sb",
"Te",
"I",
"Xe",
"Cs",
"Ba",
"Hf",
"Ta",
"W",
"Re",
"Os",
"Ir",
"Pt",
"Au",
"Hg",
"Tl",
"Pb",
"Bi",
"Po",
"At",
"Rn"
],
"smps" : [
"Group",
"Period"
],
"data" : [
[
1,
6
],
[
18,
6
],
[
1,
5
],
[
2,
5
],
[
13,
5
],
[
14,
5
],
[
15,
5
],
[
16,
5
],
[
17,
5
],
[
18,
5
],
[
1,
4
],
[
2,
4
],
[
13,
4
],
[
14,
4
],
[
15,
4
],
[
16,
4
],
[
17,
4
],
[
18,
4
],
[
1,
3
],
[
2,
3
],
[
3,
3
],
[
4,
3
],
[
5,
3
],
[
6,
3
],
[
7,
3
],
[
8,
3
],
[
9,
3
],
[
10,
3
],
[
11,
3
],
[
12,
3
],
[
13,
3
],
[
14,
3
],
[
15,
3
],
[
16,
3
],
[
17,
3
],
[
18,
3
],
[
1,
2
],
[
2,
2
],
[
3,
2
],
[
4,
2
],
[
5,
2
],
[
6,
2
],
[
7,
2
],
[
8,
2
],
[
9,
2
],
[
10,
2
],
[
11,
2
],
[
12,
2
],
[
13,
2
],
[
14,
2
],
[
15,
2
],
[
16,
2
],
[
17,
2
],
[
18,
2
],
[
1,
1
],
[
2,
1
],
[
4,
1
],
[
5,
1
],
[
6,
1
],
[
7,
1
],
[
8,
1
],
[
9,
1
],
[
10,
1
],
[
11,
1
],
[
12,
1
],
[
13,
1
],
[
14,
1
],
[
15,
1
],
[
16,
1
],
[
17,
1
],
[
18,
1
]
]
},
"z" : {
"State" : [
"Gas",
"Gas",
"Solid",
"Solid",
"Solid",
"Solid",
"Gas",
"Gas",
"Gas",
"Gas",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Gas",
"Gas",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Liquid",
"Gas",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Radioactive, no stable isotope",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Gas",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Solid",
"Liquid",
"Solid",
"Solid",
"Solid",
"Radioactive, no stable isotope",
"Radioactive, no stable isotope",
"Gas"
]
}
}
// Create the configuration for the graph
var config = {
"graphType" : "Scatter2D",
"titleAlign" : "plot::0",
"subtitleAlign" : "plot::0",
"legendHorizontalJustification" : 0,
"legendJustifyTo" : "plot",
"theme" : "paulTol",
"title" : "Which elements are gases, liquids or solids?",
"xAxis" : [
"Group"
],
"yAxis" : [
"Period"
],
"colorBy" : "State",
"colorScheme" : "User",
"colors" : [
"#66CCEE",
"#228833",
"#EE6677",
"#CCBB44"
],
"dataPointSize" : 34,
"setMinX" : 0,
"setMaxX" : 19,
"setMinY" : 0,
"setMaxY" : 7,
"showLegend" : true,
"legendPosition" : "top",
"showLegendTitle" : false,
"xAxisShow" : false,
"yAxisShow" : false,
"xAxisGridMajorShow" : false,
"yAxisGridMajorShow" : false,
"xAxisGridMinorShow" : false,
"yAxisGridMinorShow" : false,
"xAxisTitle" : "",
"yAxisTitle" : "",
"showDecorations" : true,
"decorations" : {
"marker" : [
{
"type" : "text",
"variable" : "H",
"sample" : [
"Group",
"Period"
],
"text" : "H",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "He",
"sample" : [
"Group",
"Period"
],
"text" : "He",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "N",
"sample" : [
"Group",
"Period"
],
"text" : "N",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "O",
"sample" : [
"Group",
"Period"
],
"text" : "O",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "Br",
"sample" : [
"Group",
"Period"
],
"text" : "Br",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "Hg",
"sample" : [
"Group",
"Period"
],
"text" : "Hg",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "Tc",
"sample" : [
"Group",
"Period"
],
"text" : "Tc",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "Fe",
"sample" : [
"Group",
"Period"
],
"text" : "Fe",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "Au",
"sample" : [
"Group",
"Period"
],
"text" : "Au",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "Xe",
"sample" : [
"Group",
"Period"
],
"text" : "Xe",
"offsetX" : 0,
"offsetY" : -28,
"align" : "center"
},
{
"type" : "text",
"variable" : "Rn",
"sample" : [
"Group",
"Period"
],
"text" : "Rn",
"offsetX" : 0,
"offsetY" : -28,
"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-scatter2d33-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-scatter2d33-var.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
canvasXpress(
data=y,
varAnnot=z,
colorBy="State",
colorScheme="User",
colors=list("#66CCEE", "#228833", "#EE6677", "#CCBB44"),
dataPointSize=34,
decorations=list(marker=list(list(align="center", offsetX=0, offsetY=-28, sample=list("Group", "Period"), text="H", type="text", variable="H"), list(align="center", offsetX=0, offsetY=-28, sample=list("Group", "Period"), text="He", type="text", variable="He"), list(align="center", offsetX=0, offsetY=-28, sample=list("Group", "Period"), text="N", type="text", variable="N"), list(align="center", offsetX=0, offsetY=-28, sample=list("Group", "Period"), text="O", type="text", variable="O"), list(align="center", offsetX=0, offsetY=-28, sample=list("Group", "Period"), text="Br", type="text", variable="Br"), list(align="center", offsetX=0, offsetY=-28, sample=list("Group", "Period"), text="Hg", type="text", variable="Hg"), list(align="center", offsetX=0, offsetY=-28, sample=list("Group", "Period"), text="Tc", type="text", variable="Tc"), list(align="center", offsetX=0, offsetY=-28, sample=list("Group", "Period"), text="Fe", type="text", variable="Fe"), list(align="center", offsetX=0, offsetY=-28, sample=list("Group", "Period"), text="Au", type="text", variable="Au"), list(align="center", offsetX=0, offsetY=-28, sample=list("Group", "Period"), text="Xe", type="text", variable="Xe"), list(align="center", offsetX=0, offsetY=-28, sample=list("Group", "Period"), text="Rn", type="text", variable="Rn"))),
graphType="Scatter2D",
legendHorizontalJustification=0,
legendJustifyTo="plot",
legendPosition="top",
setMaxX=19,
setMaxY=7,
setMinX=0,
setMinY=0,
showDecorations=TRUE,
showLegend=TRUE,
showLegendTitle=FALSE,
subtitleAlign="plot::0",
theme="paulTol",
title="Which elements are gases, liquids or solids?",
titleAlign="plot::0",
xAxis=list("Group"),
xAxisGridMajorShow=FALSE,
xAxisGridMinorShow=FALSE,
xAxisShow=FALSE,
xAxisTitle="",
yAxis=list("Period"),
yAxisGridMajorShow=FALSE,
yAxisGridMinorShow=FALSE,
yAxisShow=FALSE,
yAxisTitle=""
)
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 = "scatter2d33",
data = {
"y": {
"vars": ["H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne", "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca", "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn", "Ga", "Ge", "As", "Se", "Br", "Kr", "Rb", "Sr", "Y", "Zr", "Nb", "Mo", "Tc", "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn", "Sb", "Te", "I", "Xe", "Cs", "Ba", "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hg", "Tl", "Pb", "Bi", "Po", "At", "Rn"],
"smps": ["Group", "Period"],
"data": [
[1, 6],
[18, 6],
[1, 5],
[2, 5],
[13, 5],
[14, 5],
[15, 5],
[16, 5],
[17, 5],
[18, 5],
[1, 4],
[2, 4],
[13, 4],
[14, 4],
[15, 4],
[16, 4],
[17, 4],
[18, 4],
[1, 3],
[2, 3],
[3, 3],
[4, 3],
[5, 3],
[6, 3],
[7, 3],
[8, 3],
[9, 3],
[10, 3],
[11, 3],
[12, 3],
[13, 3],
[14, 3],
[15, 3],
[16, 3],
[17, 3],
[18, 3],
[1, 2],
[2, 2],
[3, 2],
[4, 2],
[5, 2],
[6, 2],
[7, 2],
[8, 2],
[9, 2],
[10, 2],
[11, 2],
[12, 2],
[13, 2],
[14, 2],
[15, 2],
[16, 2],
[17, 2],
[18, 2],
[1, 1],
[2, 1],
[4, 1],
[5, 1],
[6, 1],
[7, 1],
[8, 1],
[9, 1],
[10, 1],
[11, 1],
[12, 1],
[13, 1],
[14, 1],
[15, 1],
[16, 1],
[17, 1],
[18, 1]
]
},
"z": {
"State": ["Gas", "Gas", "Solid", "Solid", "Solid", "Solid", "Gas", "Gas", "Gas", "Gas", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Gas", "Gas", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Liquid", "Gas", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Radioactive, no stable isotope", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Gas", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Liquid", "Solid", "Solid", "Solid", "Radioactive, no stable isotope", "Radioactive, no stable isotope", "Gas"]
}
},
config = {
"graphType": "Scatter2D",
"titleAlign": "plot::0",
"subtitleAlign": "plot::0",
"legendHorizontalJustification": 0,
"legendJustifyTo": "plot",
"theme": "paulTol",
"title": "Which elements are gases, liquids or solids?",
"xAxis": ["Group"],
"yAxis": ["Period"],
"colorBy": "State",
"colorScheme": "User",
"colors": ["#66CCEE", "#228833", "#EE6677", "#CCBB44"],
"dataPointSize": 34,
"setMinX": 0,
"setMaxX": 19,
"setMinY": 0,
"setMaxY": 7,
"showLegend": True,
"legendPosition": "top",
"showLegendTitle": False,
"xAxisShow": False,
"yAxisShow": False,
"xAxisGridMajorShow": False,
"yAxisGridMajorShow": False,
"xAxisGridMinorShow": False,
"yAxisGridMinorShow": False,
"xAxisTitle": "",
"yAxisTitle": "",
"showDecorations": True,
"decorations": {
"marker": [
{
"type": "text",
"variable": "H",
"sample": ["Group", "Period"],
"text": "H",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "He",
"sample": ["Group", "Period"],
"text": "He",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "N",
"sample": ["Group", "Period"],
"text": "N",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "O",
"sample": ["Group", "Period"],
"text": "O",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "Br",
"sample": ["Group", "Period"],
"text": "Br",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "Hg",
"sample": ["Group", "Period"],
"text": "Hg",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "Tc",
"sample": ["Group", "Period"],
"text": "Tc",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "Fe",
"sample": ["Group", "Period"],
"text": "Fe",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "Au",
"sample": ["Group", "Period"],
"text": "Au",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "Xe",
"sample": ["Group", "Period"],
"text": "Xe",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "Rn",
"sample": ["Group", "Period"],
"text": "Rn",
"offsetX": 0,
"offsetY": -28,
"align": "center"
}
]
}
},
width = 760,
height = 520
)
# 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 = "scatter2d33",
data = {
"y": {
"vars": ["H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne", "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca", "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn", "Ga", "Ge", "As", "Se", "Br", "Kr", "Rb", "Sr", "Y", "Zr", "Nb", "Mo", "Tc", "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn", "Sb", "Te", "I", "Xe", "Cs", "Ba", "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hg", "Tl", "Pb", "Bi", "Po", "At", "Rn"],
"smps": ["Group", "Period"],
"data": [
[1, 6],
[18, 6],
[1, 5],
[2, 5],
[13, 5],
[14, 5],
[15, 5],
[16, 5],
[17, 5],
[18, 5],
[1, 4],
[2, 4],
[13, 4],
[14, 4],
[15, 4],
[16, 4],
[17, 4],
[18, 4],
[1, 3],
[2, 3],
[3, 3],
[4, 3],
[5, 3],
[6, 3],
[7, 3],
[8, 3],
[9, 3],
[10, 3],
[11, 3],
[12, 3],
[13, 3],
[14, 3],
[15, 3],
[16, 3],
[17, 3],
[18, 3],
[1, 2],
[2, 2],
[3, 2],
[4, 2],
[5, 2],
[6, 2],
[7, 2],
[8, 2],
[9, 2],
[10, 2],
[11, 2],
[12, 2],
[13, 2],
[14, 2],
[15, 2],
[16, 2],
[17, 2],
[18, 2],
[1, 1],
[2, 1],
[4, 1],
[5, 1],
[6, 1],
[7, 1],
[8, 1],
[9, 1],
[10, 1],
[11, 1],
[12, 1],
[13, 1],
[14, 1],
[15, 1],
[16, 1],
[17, 1],
[18, 1]
]
},
"z": {
"State": ["Gas", "Gas", "Solid", "Solid", "Solid", "Solid", "Gas", "Gas", "Gas", "Gas", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Gas", "Gas", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Liquid", "Gas", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Radioactive, no stable isotope", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Gas", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Liquid", "Solid", "Solid", "Solid", "Radioactive, no stable isotope", "Radioactive, no stable isotope", "Gas"]
}
},
config = {
"graphType": "Scatter2D",
"titleAlign": "plot::0",
"subtitleAlign": "plot::0",
"legendHorizontalJustification": 0,
"legendJustifyTo": "plot",
"theme": "paulTol",
"title": "Which elements are gases, liquids or solids?",
"xAxis": ["Group"],
"yAxis": ["Period"],
"colorBy": "State",
"colorScheme": "User",
"colors": ["#66CCEE", "#228833", "#EE6677", "#CCBB44"],
"dataPointSize": 34,
"setMinX": 0,
"setMaxX": 19,
"setMinY": 0,
"setMaxY": 7,
"showLegend": True,
"legendPosition": "top",
"showLegendTitle": False,
"xAxisShow": False,
"yAxisShow": False,
"xAxisGridMajorShow": False,
"yAxisGridMajorShow": False,
"xAxisGridMinorShow": False,
"yAxisGridMinorShow": False,
"xAxisTitle": "",
"yAxisTitle": "",
"showDecorations": True,
"decorations": {
"marker": [
{
"type": "text",
"variable": "H",
"sample": ["Group", "Period"],
"text": "H",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "He",
"sample": ["Group", "Period"],
"text": "He",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "N",
"sample": ["Group", "Period"],
"text": "N",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "O",
"sample": ["Group", "Period"],
"text": "O",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "Br",
"sample": ["Group", "Period"],
"text": "Br",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "Hg",
"sample": ["Group", "Period"],
"text": "Hg",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "Tc",
"sample": ["Group", "Period"],
"text": "Tc",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "Fe",
"sample": ["Group", "Period"],
"text": "Fe",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "Au",
"sample": ["Group", "Period"],
"text": "Au",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "Xe",
"sample": ["Group", "Period"],
"text": "Xe",
"offsetX": 0,
"offsetY": -28,
"align": "center"
},
{
"type": "text",
"variable": "Rn",
"sample": ["Group", "Period"],
"text": "Rn",
"offsetX": 0,
"offsetY": -28,
"align": "center"
}
]
}
},
width = 760,
height = 520
)
)
using CanvasXpress
canvasxpress(Dict(
"y" => Dict(
"vars" => ["H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne", "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca", "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn", "Ga", "Ge", "As", "Se", "Br", "Kr", "Rb", "Sr", "Y", "Zr", "Nb", "Mo", "Tc", "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn", "Sb", "Te", "I", "Xe", "Cs", "Ba", "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hg", "Tl", "Pb", "Bi", "Po", "At", "Rn"],
"smps" => ["Group", "Period"],
"data" => [
[1, 6],
[18, 6],
[1, 5],
[2, 5],
[13, 5],
[14, 5],
[15, 5],
[16, 5],
[17, 5],
[18, 5],
[1, 4],
[2, 4],
[13, 4],
[14, 4],
[15, 4],
[16, 4],
[17, 4],
[18, 4],
[1, 3],
[2, 3],
[3, 3],
[4, 3],
[5, 3],
[6, 3],
[7, 3],
[8, 3],
[9, 3],
[10, 3],
[11, 3],
[12, 3],
[13, 3],
[14, 3],
[15, 3],
[16, 3],
[17, 3],
[18, 3],
[1, 2],
[2, 2],
[3, 2],
[4, 2],
[5, 2],
[6, 2],
[7, 2],
[8, 2],
[9, 2],
[10, 2],
[11, 2],
[12, 2],
[13, 2],
[14, 2],
[15, 2],
[16, 2],
[17, 2],
[18, 2],
[1, 1],
[2, 1],
[4, 1],
[5, 1],
[6, 1],
[7, 1],
[8, 1],
[9, 1],
[10, 1],
[11, 1],
[12, 1],
[13, 1],
[14, 1],
[15, 1],
[16, 1],
[17, 1],
[18, 1]
]
),
"z" => Dict(
"State" => ["Gas", "Gas", "Solid", "Solid", "Solid", "Solid", "Gas", "Gas", "Gas", "Gas", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Gas", "Gas", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Liquid", "Gas", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Radioactive, no stable isotope", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Gas", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Solid", "Liquid", "Solid", "Solid", "Solid", "Radioactive, no stable isotope", "Radioactive, no stable isotope", "Gas"]
)
);
graphType = "Scatter2D",
titleAlign = "plot::0",
subtitleAlign = "plot::0",
legendHorizontalJustification = 0,
legendJustifyTo = "plot",
theme = "paulTol",
title = "Which elements are gases, liquids or solids?",
xAxis = ["Group"],
yAxis = ["Period"],
colorBy = "State",
colorScheme = "User",
colors = ["#66CCEE", "#228833", "#EE6677", "#CCBB44"],
dataPointSize = 34,
setMinX = 0,
setMaxX = 19,
setMinY = 0,
setMaxY = 7,
showLegend = true,
legendPosition = "top",
showLegendTitle = false,
xAxisShow = false,
yAxisShow = false,
xAxisGridMajorShow = false,
yAxisGridMajorShow = false,
xAxisGridMinorShow = false,
yAxisGridMinorShow = false,
xAxisTitle = "",
yAxisTitle = "",
showDecorations = true,
decorations = Dict(
"marker" => [
Dict(
"type" => "text",
"variable" => "H",
"sample" => ["Group", "Period"],
"text" => "H",
"offsetX" => 0,
"offsetY" => -28,
"align" => "center"
),
Dict(
"type" => "text",
"variable" => "He",
"sample" => ["Group", "Period"],
"text" => "He",
"offsetX" => 0,
"offsetY" => -28,
"align" => "center"
),
Dict(
"type" => "text",
"variable" => "N",
"sample" => ["Group", "Period"],
"text" => "N",
"offsetX" => 0,
"offsetY" => -28,
"align" => "center"
),
Dict(
"type" => "text",
"variable" => "O",
"sample" => ["Group", "Period"],
"text" => "O",
"offsetX" => 0,
"offsetY" => -28,
"align" => "center"
),
Dict(
"type" => "text",
"variable" => "Br",
"sample" => ["Group", "Period"],
"text" => "Br",
"offsetX" => 0,
"offsetY" => -28,
"align" => "center"
),
Dict(
"type" => "text",
"variable" => "Hg",
"sample" => ["Group", "Period"],
"text" => "Hg",
"offsetX" => 0,
"offsetY" => -28,
"align" => "center"
),
Dict(
"type" => "text",
"variable" => "Tc",
"sample" => ["Group", "Period"],
"text" => "Tc",
"offsetX" => 0,
"offsetY" => -28,
"align" => "center"
),
Dict(
"type" => "text",
"variable" => "Fe",
"sample" => ["Group", "Period"],
"text" => "Fe",
"offsetX" => 0,
"offsetY" => -28,
"align" => "center"
),
Dict(
"type" => "text",
"variable" => "Au",
"sample" => ["Group", "Period"],
"text" => "Au",
"offsetX" => 0,
"offsetY" => -28,
"align" => "center"
),
Dict(
"type" => "text",
"variable" => "Xe",
"sample" => ["Group", "Period"],
"text" => "Xe",
"offsetX" => 0,
"offsetY" => -28,
"align" => "center"
),
Dict(
"type" => "text",
"variable" => "Rn",
"sample" => ["Group", "Period"],
"text" => "Rn",
"offsetX" => 0,
"offsetY" => -28,
"align" => "center"
)
]
)
)

































