line_chart#
- 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) Figure, Axes #
Create a line chart from the provided dataframe and axes information.
- Parameters:
data :
list
ofDataFrame
The list of DataFrames containing the data.root :
STKObjectRoot
The STK object root.numerical_columns :
list
ofstr
The list of dataframe columns with numerical values.time_columns :
list
ofstr
The list of dataframe columns with time values.axes :
list
ofdict
The list of dictionaries containing information about the data to plot.x_column :
str
The column corresponding to the x-axis data.x_label :
str
The label for the x-axis.title :
str
The title of the chart.colormap :
Colormap
The colormap with which to color the lines (the default is None).time_unit_abbreviation :
str
The time unit for formatting (the default is “UTCG”).formatter :
Callable
[[float
,float
],str
] The formatter for time axes (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 line_chart