pie_chart#

pie_chart(root: STKObjectRoot, df: DataFrame, numerical_columns: list[str], time_columns: list[str], column: str, title: str, dimension: str, label_column: str = None, colormap: Colormap = None) Figure, Axes#

Create a pie chart from the provided dataframe and information.

Parameters:

root : STKObjectRoot The STK object root.

df : DataFrame The dataframe containing the data.

numerical_columns : list of str The list of dataframe columns with numerical values.

time_columns : list of str The list of dataframe columns with time values.

column : str The dataframe column to plot in the pie chart.

title : str The title of the chart.

dimension : str The dimension of the chart data.

label_column : str The dataframe column corresponding to the chart labels (the default is None).

colormap : Colormap The colormap with which to color the pie chart slices (the default is None).

Returns:

Figure The newly created figure.

Axes The newly created axes.

Import detail#

from ansys.stk.extensions.data_analysis.graphs.graph_helpers import pie_chart