MatrixView#

class cegalprizm.investigator.MatrixView(investigation: cegalprizm.investigator.inv.investigation.Investigation)#

A class representing a MatrixView

The view defines how a matrix plot should be displayed. It allows control of both what data should be displayed and how the the data should be rendered.

Functions

__init__(investigation)

copy()

Create a copy of this view

get_json()

Gets the json string representing the current view

set_appearance_by(appearance_by_option)

Sets what attribute in the investigation is used to determine the appearance of the data in the view

set_color_by(color_by_option)

Sets what attribute in the investigation is used to determine the color of the data in the view

set_colorscale_location(inside_viewport, ...)

Set where in the plot the points colorscale is to be shown.

set_contour_by(contour_by_option)

Sets what discrete attribute in the investigation is used to determine the contours that should be shown in the view

set_count_axis(count_type)

Set the what values should be used for the histogram count axis

set_dataset_priority(dataset_names)

Set the priority order of the datasets

set_datasets_visible(dataset_names)

Set which datasets should be visible in the view

set_dimensions(dimension_names)

Sets the dimensions to be shown in the matrix plot

set_discrete_visible(tags)

Set which discrete tags should be visible in the view

set_draw_statistics(draw_statistics)

Set whether the statistics should be shown

set_highlight(highlight_option)

Sets what discrete attribute in the investigation is used as the highlight option in the view

set_legend_location(inside_viewport, location)

Set where in the plot the legend is to be shown

set_split_by(split_by_option)

Sets what discrete attribute in the investigation is used to split the plots in the view

show_colorscale(show)

Set whether the points colorscale is shown

show_colorscale_frame(show_frame)

Set whether the frame should be shown around the points colorscale

show_data(show)

Set whether the data should be shown

show_filled_histogram(filled)

Set whether the histogram data should be shown as filled

show_histogram_as(bars_lines)

Set whether the histogram data should be drawn as bars or lines

show_histograms(show)

Set whether the histograms should be shown in the matrix plot diagonal

show_legend(show)

Set whether the legend is shown

show_legend_frame(show_frame)

Set whether the frame should be shown around the legend

show_stacked_histogram(stacked)

Set whether the histogram data should be shown as stacked

show_statistics_mean(show_mean)

Set whether the mean should be shown

show_statistics_median(show_median)

Set whether the median should be shown

show_statistics_minmax(show_min_max)

Set whether the min/max of the statistics should be shown

show_statistics_percentile(show_P10_P90)

Set whether the P10/P90 percentile values should be shown

copy()#

Create a copy of this view

Returns

the copied view

Return type

MatrixView

get_json() str#

Gets the json string representing the current view

Returns

The json string

Return type

str

set_appearance_by(appearance_by_option: str)#

Sets what attribute in the investigation is used to determine the appearance of the data in the view

Parameters

color_by_option (str) – The name of the attribute in the investigation

Raises

ValueError – if the appearance_by_option is not valid

set_color_by(color_by_option: str)#

Sets what attribute in the investigation is used to determine the color of the data in the view

Parameters

color_by_option (str) – The name of the attribute in the investigation

Raises

ValueError – if the color_by_option is not valid

set_colorscale_location(inside_viewport: bool, location: str)#

Set where in the plot the points colorscale is to be shown.

Valid locations outside viewport are ‘left’ or ‘right’ Valid locations inside viewport are ‘top-left’ or ‘top-right’ or ‘bottom-left’ or ‘bottom-right’

Parameters
  • inside_viewport (bool) – If True, the colorscale will be shown inside the viewport

  • location (str) – A string indicating the desired location of the colorscale

Raises

ValueError – if the location is not a valid string

set_contour_by(contour_by_option: str)#

Sets what discrete attribute in the investigation is used to determine the contours that should be shown in the view

Parameters

contour_by_option (str) – The name of the attribute in the investigation

Raises

ValueError – if the contour_by_option is not valid

set_count_axis(count_type: str)#

Set the what values should be used for the histogram count axis

Parameters

count_type (str) – A string describing what values should be used on the count axis

Raises

ValueError – if count_type is not a valid string

set_dataset_priority(dataset_names: Sequence[str])#

Set the priority order of the datasets

Parameters

dataset_names (Sequence[str]) – A list of dataset names in priority order

Raises

ValueError – if any dataset_names are not valid

set_datasets_visible(dataset_names: Sequence[str])#

Set which datasets should be visible in the view

By default, all datasets will be visible in the view.

Note: This new list of datasets will replace any previous list supplied.

Parameters

dataset_names (Sequence[str]) – A list of dataset names to be made visible

Raises

ValueError – if any dataset_names are not valid

set_dimensions(dimension_names: Sequence[str])#

Sets the dimensions to be shown in the matrix plot

Parameters

dimension_names (Sequence[str]) – A list of the names of the dimensions to be used

Raises

ValueError – if the dimension is not a valid continuous dimension

set_discrete_visible(tags: Dict[str, List[str]])#

Set which discrete tags should be visible in the view

By default, all discrete tags will be visible in the view.

Note: This new list of discrete tags will replace any previous list supplied.

Parameters

tags (Sequence[str]) – The list of discrete tags to be made visible

Raises

ValueError – if any tags are not valid

set_draw_statistics(draw_statistics: bool)#

Set whether the statistics should be shown

Parameters

show (bool) – Should the statistics be shown

set_highlight(highlight_option: str)#

Sets what discrete attribute in the investigation is used as the highlight option in the view

Parameters

highlight_option (str) – The name of the attribute in the investigation

Raises

ValueError – if the highlight_option is not valid

set_legend_location(inside_viewport: bool, location: str)#

Set where in the plot the legend is to be shown

Valid locations outside viewport are ‘left’ or ‘right’ Valid locations inside viewport are ‘top-left’ or ‘top-right’ or ‘bottom-left’ or ‘bottom-right’

Parameters
  • inside_viewport (bool) – If True, the legend will be shown inside the viewport

  • location (str) – A string indicating the desired location of the legend

Raises

ValueError – if the location is not a valid string

set_split_by(split_by_option: str)#

Sets what discrete attribute in the investigation is used to split the plots in the view

Parameters

split_by_option (str) – The name of the attribute in the investigation

Raises

ValueError – if the split_by_option is not valid

show_colorscale(show: bool)#

Set whether the points colorscale is shown

Parameters

show (bool) – Should the colorscale be shown

show_colorscale_frame(show_frame: bool)#

Set whether the frame should be shown around the points colorscale

Parameters

show (bool) – Should the colorscale be shown

show_data(show: bool)#

Set whether the data should be shown

Parameters

show (bool) – Should the data be shown

show_filled_histogram(filled: bool)#

Set whether the histogram data should be shown as filled

Parameters

filled (bool) – Should the histogram be shown filled

show_histogram_as(bars_lines: str)#

Set whether the histogram data should be drawn as bars or lines

Parameters

bars_lines (str) – A string describing how the histogram data should be shown

Raises

ValueError – if bars_lines is not a valid string

show_histograms(show: bool)#

Set whether the histograms should be shown in the matrix plot diagonal

Parameters

show (bool) – Should the histograms be shown

show_legend(show: bool)#

Set whether the legend is shown

Parameters

show (bool) – Should the legend be shown

show_legend_frame(show_frame: bool)#

Set whether the frame should be shown around the legend

The default value is True.

Parameters

show_frame (bool) – If True; a frame will be shown around the legend

show_stacked_histogram(stacked: bool)#

Set whether the histogram data should be shown as stacked

Parameters

stacked (bool) – Should the histogram be shown stacked

show_statistics_mean(show_mean: bool)#

Set whether the mean should be shown

Parameters

show (bool) – Should the mean be shown

show_statistics_median(show_median: bool)#

Set whether the median should be shown

Parameters

show (bool) – Should the median be shown

show_statistics_minmax(show_min_max: bool)#

Set whether the min/max of the statistics should be shown

Parameters

show (bool) – Should the statistics min/max be shown

show_statistics_percentile(show_P10_P90: bool)#

Set whether the P10/P90 percentile values should be shown

Parameters

show (bool) – Should the percentile values be shown