interval_pie_chart#
- ansys.stk.extensions.data_analysis.graphs.graph_helpers.interval_pie_chart(root: STKObjectRoot, df: DataFrame, numerical_columns: list[str], time_columns: list[str], start_column: str, stop_column: str, start_time: str, stop_time: str, title: str, dimension: str, cumulative: bool = False, color_list: list[Any] = None) Figure, Axes#
Create an interval pie chart from the provided dataframe.
- 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.start_column :
strThe column containing the start times of the intervals.stop_column :
strThe column containing the stop times of the intervals.start_time :
strThe start time of the calculation.stop_time :
strThe stop time of the calculation.title :
strThe title of the chart.dimension :
strThe dimension of the chart data.cumulative :
boolWhether the intervals should be summed into durations and gaps (the default is False).color_list :
listofAnyThe colors with which to color the pie chart slices (the default is None). Must have length >= 2.- Returns:
FigureThe newly created figure.AxesThe newly created axes.- Raises:
ValueErrorIf the length of color_list is less than 2.
Import detail#
from ansys.stk.extensions.data_analysis.graphs.graph_helpers import interval_pie_chart