pie_chart#
- ansys.stk.extensions.data_analysis.graphs.graph_helpers.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 :
STKObjectRootThe STK object root.df :
DataFrameThe dataframe containing the data.numerical_columns :
listofstrThe list of dataframe columns with numerical values.time_columns :
listofstrThe list of dataframe columns with time values.column :
strThe dataframe column to plot in the pie chart.title :
strThe title of the chart.dimension :
strThe dimension of the chart data.label_column :
strThe dataframe column corresponding to the chart labels (the default is None).colormap :
ColormapThe colormap with which to color the pie chart slices (the default is None).- Returns:
FigureThe newly created figure.AxesThe newly created axes.
Import detail#
from ansys.stk.extensions.data_analysis.graphs.graph_helpers import pie_chart