graph LR
CLI_Command_Dispatcher["CLI Command Dispatcher"]
Data_Ingestion_Preprocessing["Data Ingestion & Preprocessing"]
Scatter_Plot_Engine["Scatter Plot Engine"]
Histogram_Plotting_Engine["Histogram Plotting Engine"]
Terminal_Renderer["Terminal Renderer"]
CLI_Command_Dispatcher -- "configures/directs" --> Data_Ingestion_Preprocessing
CLI_Command_Dispatcher -- "configures/directs" --> Scatter_Plot_Engine
CLI_Command_Dispatcher -- "configures/directs" --> Histogram_Plotting_Engine
Data_Ingestion_Preprocessing -- "provides data to" --> Scatter_Plot_Engine
Data_Ingestion_Preprocessing -- "provides data to" --> Histogram_Plotting_Engine
Scatter_Plot_Engine -- "generates plot data for" --> Terminal_Renderer
Histogram_Plotting_Engine -- "generates plot data for" --> Terminal_Renderer
The bashplotlib architecture is designed as a modular pipeline, efficiently processing data from command-line input to terminal-based visualizations. It begins with the CLI Command Dispatcher acting as the orchestrator, interpreting user commands and initiating the appropriate data flow. Data is then ingested and preprocessed by the Data Ingestion & Preprocessing component, ensuring it's in a suitable format. This prepared data is subsequently fed into specialized Plotting Engines (either Scatter Plot or Histogram), which perform the core visualization logic. Finally, the Terminal Renderer translates the generated plot data into ASCII characters, delivering the visual output directly to the command line. This clear separation of concerns facilitates maintainability and provides a straightforward, linear data flow, making it ideal for diagrammatic representation as a series of interconnected processing stages.
The entry point for the application, responsible for parsing command-line arguments, validating inputs, and directing control flow to the appropriate plotting engine based on user commands.
Related Classes/Methods:
Handles the reading of raw numerical data from standard input or files. It performs initial data cleaning, parsing, and basic transformations necessary before the data can be processed by the plotting engines.
Related Classes/Methods:
Encapsulates all core logic for generating scatter plot data structures. This includes determining plot scales, mapping data points to terminal coordinates, and preparing the visual representation for rendering.
Related Classes/Methods:
Contains the core algorithms for calculating histogram bins and preparing data for histogram visualization. It determines frequency distributions and prepares the data structure for terminal rendering.
Related Classes/Methods:
Responsible for converting processed plot data (from either the Scatter Plot or Histogram Engine) into ASCII characters and rendering them to the terminal. This includes applying formatting, colors, and handling the final output display.
Related Classes/Methods: