line_chart#
- ansys.stk.extensions.data_analysis.graphs.graph_helpers.line_chart(data: list[DataFrame], root: STKObjectRoot, numerical_columns: list[str], time_columns: list[str], axes: list[dict], x_column: str, x_label: str, title: str, colormap: Colormap = None, time_unit_abbreviation: str = 'UTCG', formatter: collections.abc.Callable[[float, float], str] = None, multiple_data_providers: bool = False) Figure, Axes#
Create a line chart from the provided dataframe and axes information.
- Parameters:
data :
listofDataFrameThe list of DataFrames containing the data.root :
STKObjectRootThe STK object root.numerical_columns :
listofstrThe list of dataframe columns with numerical values.time_columns :
listofstrThe list of dataframe columns with time values.axes :
listofdictThe list of dictionaries containing information about the data to plot.x_column :
strThe column corresponding to the x-axis data.x_label :
strThe label for the x-axis.title :
strThe title of the chart.colormap :
ColormapThe colormap with which to color the lines (the default is None).time_unit_abbreviation :
strThe time unit for formatting (the default is “UTCG”).formatter :
Callable[[float,float],str] The formatter for time axes (the default is None).multiple_data_providers: bool :
Whether each dataframe provided corresponds to a different data provider and axis (the default is False).- Returns:
FigureThe newly created figure.AxesThe newly created axes.
Import detail#
from ansys.stk.extensions.data_analysis.graphs.graph_helpers import line_chart