Skip to content

Documentation for acme_plot

acme_plot.plot

plot_column(df, column_name, plot_kwargs=None, subplot_threshold=10, symbol_column='symbol', datetime_column='datetime')

Plot time series data from a DataFrame with symbol grouping.

This function creates either a single plot with multiple lines or a grid of subplots, depending on the number of unique symbols in the data. If the number of symbols exceeds the subplot_threshold, it switches to a subplot view for better visibility.

Parameters:

Name Type Description Default
df DataFrame

DataFrame containing the time series data

required
column_name str

Name of the column to plot on the y-axis

required
plot_kwargs dict

Additional keyword arguments to pass to plt.plot()

None
subplot_threshold int

Maximum number of symbols before switching to subplots. Defaults to 10.

10
symbol_column str

Name of the column containing symbol identifiers. Defaults to 'symbol'.

'symbol'
datetime_column str

Name of the column containing datetime values. Defaults to 'datetime'.

'datetime'

Raises:

Type Description
ValueError

If the DataFrame is missing required datetime or symbol columns

Returns:

Name Type Description
None

Displays the plot but does not return any value