Plotting

The plot command allows you to generate 2D and 1D histograms from your trace data. This is useful for visualizing the overall distribution of your dataset or inspecting specific clusters after running a clustering algorithm.

Usage

Basic Plotting

To plot the histograms for an entire dataset without any specific grouping:

icluto plot <traces_file> <output_dir>
  • <traces_file>: Path to your input trace file (e.g., .npy, .bin).
  • <output_dir>: Directory where the plot will be saved.

Example:

icluto plot traces.npy ./plots

This will generate dataset.png inside the ./plots directory.

Plotting with Clusters

If you have already clustered your data and have a labels file (a NumPy array matching the length of your traces), you can plot histograms for each cluster individually:

icluto plot <traces_file> <labels_file> <output_dir>
  • <traces_file>: Path to your input trace file.
  • <labels_file>: Path to the .npy file containing cluster labels.
  • <output_dir>: Directory where the plots will be saved.

Example:

icluto plot traces.npy labels.npy ./plots

This will generate multiple images in the ./plots directory, one for each unique label found in labels.npy, named cluster_{label}.png.

Output

  • dataset.png: Generated when no labels are provided. Shows the 2D and 1D histograms for all traces.
  • cluster_{label}.png: Generated when labels are provided. Shows the histograms for the specific subset of traces belonging to cluster {label}.