This function creates a scatter graph overlaid onto an image using cartesian variables including custom colours, point sizes, legend and even a heatmap mode. It is a very visually effective way to present your cartesian data on a map which is best to use the same image you use in your Angles markup. A legend or key is added by default but just set this to 'false' if it is not needed.
Basic format: "content_name": ["create_scatter_plot",
["var_array1", "var_array2", ...],
"location_id",
"background_image_path",
"width",
"height",
["colour1", "colour2", ...],
"point_size",
"legend",
"heatmap_mode"
]
e.g: "scatter_plot": ["create_scatter_plot", ["Shots", "Pass"], "#B4", "images/map_football_horiz.jpeg", 350, 250, ["fulcrum", "red"], 4]
The heatmap mode turns on a transparency setting for the data points which when layered over a certain area give an illusion of a more intense activity. Heatmap mode is activated by setting it to 'true'. Heatmap mode works nicely with slightly larger point_sizes.
e.g scatter_plot": ["create_scatter_plot", ["Shots", "Pass"], "#B4", "", 350, 250, ["fulcrum", "red"], 6, false, true]
Scatter plot with pitch map background
Heatmap Mode = true