This tutorial will talk about how to plot the clusters created from the data in Tutorial 1.
NOTE FOR CONTRIBUTORS: Always clear all output before committing (Cell
> All Output
> Clear
)!
# Magic
%matplotlib inline
# Reload modules whenever they change
%load_ext autoreload
%autoreload 2
# Make clusterking package available even without installation
import sys
sys.path = ["../../"] + sys.path
import clusterking as ck
As in tutorial 3 we load the data created in tutorial 1:
d = ck.Data("output/tutorial_basics.sql")
d.configure_variable("CVL_bctaunutau", r"$C_{V_L}$")
d.configure_variable("CSL_bctaunutau", r"$C_{S_L}$")
d.configure_variable("CT_bctaunutau", r"$C_T$")
Scatter plot: The list is the list of the columns on the axes. Changing the order of the columns will turn around the cube.
d.plot_clusters_scatter(['CVL_bctaunutau', 'CSL_bctaunutau', 'CT_bctaunutau']);
If it is still not easy to get an overview, use the clusters
argument to limit ourselves to certain clusters.
d.plot_clusters_scatter(['CVL_bctaunutau', 'CSL_bctaunutau', 'CT_bctaunutau'], clusters=[1, 2, 3]);
If only two columns are given, several cuts will be presented (up to 16 by default):
Note that the benchmark points are denoted by a larger symbol.
d.plot_clusters_scatter(['CVL_bctaunutau', 'CSL_bctaunutau']);
Again, we can also limit ourselves on the clusters that we want to display:
d.plot_clusters_scatter(['CVL_bctaunutau', 'CSL_bctaunutau'], clusters=[1,2]);
You can also fill the space between sample points:
d.plot_clusters_fill(['CVL_bctaunutau', 'CSL_bctaunutau']);
Several options to configure the ClusterPlot object can be changed after the object has been initialized.
The number of plots for the 'slices' can be selected as follows:
d.plot_clusters_fill(['CVL_bctaunutau', 'CSL_bctaunutau'], max_subplots=3);
help(d.plot_clusters_scatter)