Default parameters

The default parameters for the plot types are as follows:

  • df: pd.DataFrame (required)
    The dataframe used for the data to plot. Most other parameters are column names in this dataframe (e.g. media, color, etc.).
  • media: str (required)
    The column name of the media to display in the plot. See data loading for more information about the type of media that can be displayed.
  • show: bool = True
    Whether to show the plot or not. If show is set to True, clusterfun will start a local server to display the plot in a web browser. More specifically, we start a FastAPI server where we mount the webpage as a static file. The application itself does not require an internet connection. All data is loaded locally and does not leave your machine/browser.
    If show is set to False, clusterfun only saves the required data to serve the plot later on and return the path to where the data is stored. If you want to serve the plot yourself later on, you can run clusterfun serve {path - to - data}|{uuid} in the command line to start a local server for the plot you are interested in.
  • color: Optional[str] = None
    If given, points will be colored based on the values in the given column. Powerful for visualising clusters or classes of data.
  • title: Optional[str] = None
    The title to use for the plot.
  • bounding_box: Optional[str] = None
    You can visualise bounding boxes on top of your images by with the bounding_box parameter. For this to work, you need to have a bounding box column in the dataframe used to plot the data. Each cell in the dataframe needs to contain a dictionary or a list of dictionaries with bounding box values: xmin, ymin, xmax, ymax, label (optional), color (optional). The keys of the expected dictionary are:
    • xmin: Union[float, int]
    • ymin: Union[float, int]
    • xmax: Union[float, int]
    • ymax: Union[float, int]
    • label: Optional[str] = None
    • color: Optional[str] = None
    If no color is provided, a default color scheme will be used. The color value can be a color name or hex value. The label will be displayed in the top left of the bounding box.

    Example:
    single_bounding_box = { 
      "xmin": 12,
      "ymin": 10,
      "xmax": 100,
      "ymax": 110,
      "color": "green",
      "label": "ground truth"
    }