lammpskit.plotting.TimeSeriesPlotConfig
- class lammpskit.plotting.TimeSeriesPlotConfig(alpha=0.55, linewidth=0.1, markersize=5, marker='^', include_line=True, include_scatter=True, format='pdf', fontsize_title=8, fontsize_labels=8, fontsize_ticks=8, fontsize_legend=8)[source]
Configuration class for standardized time series plotting with publication-ready defaults.
Provides centralized control over plot styling, elements, and output formatting for consistent scientific visualization across LAMMPSKit analysis workflows. Supports both line plots and scatter plots with flexible element combination.
- alpha
Transparency level for plot elements. Range [0.0, 1.0] where 0.0 is fully transparent and 1.0 is fully opaque. Balanced for overlay visualization.
- Type:
float, default=0.55
- linewidth
Line thickness for connected plots. Thin lines prevent visual clutter in dense time series data. Use higher values (0.5-2.0) for presentation plots.
- Type:
float, default=0.1
- markersize
Size of scatter plot markers. Optimized for readability without overcrowding. Scale proportionally for different figure sizes.
- Type:
float, default=5
- marker
Matplotlib marker style for scatter plots. Options: ‘o’ (circle), ‘s’ (square), ‘^’ (triangle), ‘*’ (star), ‘+’ (plus), ‘x’ (cross), ‘D’ (diamond).
- Type:
str, default=’^’
- include_line
Whether to draw connecting lines between data points. Useful for trend visualization in temporal data. Disable for pure scatter analysis.
- Type:
bool, default=True
- include_scatter
Whether to draw individual data point markers. Essential for discrete data visualization. Disable for smooth trend-only plots.
- Type:
bool, default=True
- format
Output file format for saved figures. Options: ‘pdf’ (vector, publication), ‘svg’ (web-compatible vector), ‘png’ (raster), ‘eps’ (LaTeX-compatible).
- Type:
str, default=’pdf’
- fontsize_title
Font size for plot titles in points. Optimized for compact scientific layout. Use None to disable title font control.
- Type:
int, default=8
- fontsize_labels
Font size for axis labels in points. Consistent with scientific journal standards. Use None to use matplotlib defaults.
- Type:
int, default=8
- fontsize_ticks
Font size for axis tick labels in points. Maintains readability at small sizes. Use None to use matplotlib defaults.
- Type:
int, default=8
- fontsize_legend
Font size for legend text in points. Balanced for information density. Use None to use matplotlib defaults.
- Type:
int, default=8
Notes
Configuration Design Philosophy: - Publication-ready defaults minimize post-processing - Centralized font control ensures consistency across figures - Flexible element control (line/scatter) supports diverse data types - Conservative styling prevents visual clutter in complex analyses
Performance Considerations: - Transparent plots (alpha < 1.0) may slow rendering for large datasets - Vector formats (PDF/SVG) maintain quality but increase file size - Font rendering overhead is minimal for typical scientific plots
Examples
Default configuration for temporal analysis:
>>> config = TimeSeriesPlotConfig() >>> print(f"Using marker: {config.marker}, alpha: {config.alpha}")
Custom configuration for presentation plots:
>>> config = TimeSeriesPlotConfig( ... linewidth=1.0, ... markersize=8, ... alpha=0.8, ... fontsize_title=12, ... fontsize_labels=10 ... )
Scatter-only configuration for statistical analysis:
>>> config = TimeSeriesPlotConfig( ... include_line=False, ... include_scatter=True, ... marker='o', ... markersize=3 ... )
High-contrast configuration for printing:
>>> config = TimeSeriesPlotConfig( ... alpha=1.0, ... linewidth=0.8, ... format='eps' ... )
- Parameters:
- __init__(alpha=0.55, linewidth=0.1, markersize=5, marker='^', include_line=True, include_scatter=True, format='pdf', fontsize_title=8, fontsize_labels=8, fontsize_ticks=8, fontsize_legend=8)
Methods
__init__([alpha, linewidth, markersize, ...])Attributes
- __init__(alpha=0.55, linewidth=0.1, markersize=5, marker='^', include_line=True, include_scatter=True, format='pdf', fontsize_title=8, fontsize_labels=8, fontsize_ticks=8, fontsize_legend=8)