get_diagnostic_plot
Generate a diagnostic plot for a single column, automatically selecting the best chart type based on the column's classification (continuous, discrete, categorical, binary, temporal), and save as PNG.
Instructions
Generate and save a diagnostic plot for a single column as a PNG file. The plot type is automatically selected based on the column's classification:
continuous: 2x2 panel — histogram with KDE overlay, boxplot with outliers, QQ plot with reference line, ECDF
discrete: bar chart of value counts and boxplot side by side
categorical: horizontal bar chart of top 20 values with percentage labels
binary: bar chart of class balance with proportion labels; bars are red if the majority:minority ratio exceeds 3:1
temporal: line plot of counts over time and bar chart of counts by month
high_cardinality: no plot is generated; a message is returned instead
Saves the PNG to output_dir/{column}_diagnostics.png and returns the file path. Use output_dir to control where plots land — the same folder as the dataset or a dedicated output directory both work well.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| column | Yes | ||
| output_dir | Yes | ||
| table | No |