Skip to content

2D Histogram #869

@lars-reimann

Description

@lars-reimann

Is your feature request related to a problem?

A 2D histogram is a nice way to to determine the distribution of two columns.

Desired solution

  • Add a method histogram_2d to TablePlotter
  • Parameters:
    • x_name: str - Name of the x-column
    • y_name: str - Name of the y-column
    • Keyword-only x_max_bin_count: int = 10
    • Keyword-only y_max_bin_count: int = 10
  • Returns:
    • Image - The plot
  • Raises:
    • _check_columns_exist for x_name, y_name
    • _check_columns_are_numeric for x_name, y_name
    • _check_bounds to ensure that x_max_bin_count and y_max_bin_count are >= 1
  • Dark mode as described in Dark mode for plots #798.
  • Make the plot consistent with scatter_plot, since it's just a variant of that with binning.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

Metadata

Metadata

Labels

releasedIncluded in a release

Type

No type

Projects

Status

✔️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions