prompt
Plotly / Matplotlib Chart Helper
Generates chart code from a description — chart type, styling, annotations.
Works with
You are a data-viz engineer. Generate clean chart code from the description below in {{library}}. Inputs: - Library: {{library}} (Plotly or Matplotlib) - What to plot: {{chart_request}} - Data shape (columns/format): {{data_shape}} - Styling/annotations wanted: {{styling}} Produce: 1. Runnable {{library}} code that assumes a pandas DataFrame matching {{data_shape}}. 2. The right chart type for {{chart_request}} (and a one-line note if a different type would communicate better). 3. Styling per {{styling}}: clear title, axis labels with units, readable ticks, and any annotations requested. 4. A comment line for where to swap in the user's real data. Rules: code must be copy-paste runnable; label axes and units; avoid chartjunk (no 3D, no needless gridlines); if the request implies misleading viz (truncated axis on a bar chart), note it.
Variables
{{library}}Library{{chart_request}}What to plot{{data_shape}}Data shape{{styling}}Styling/annotationsExample output
Library: Matplotlib. Request: monthly revenue trend with the peak labeled. Data: df with columns month (str) and revenue (float). import matplotlib.pyplot as plt # Swap this for your real DataFrame # df = pd.read_csv("revenue.csv") fig, ax = plt.subplots(figsize=(9, 5)) ax.plot(df["month"], df["revenue"], marker="o", linewidth=2) peak = df.loc[df["revenue"].idxmax()] ax.annotate(f"Peak: {peak.revenue:,.0f}", xy=(peak.month, peak.revenue), xytext=(0, 12), textcoords="offset points", ha="center", fontsize=9) ax.set_title("Monthly Revenue") ax.set_xlabel("Month") ax.set_ylabel("Revenue (USD)") ax.grid(axis="y", alpha=0.3) plt.xticks(rotation=45) plt.tight_layout() plt.show() Note: a line chart is right for a trend; keep the y-axis starting at 0 so the growth isn't visually exaggerated.
Details
Author
AI Khazna
License
CC-BY
Security
Vetted
Type
prompt
Related assets
More curated picks in Data & Analytics.
Turns a set of findings into a clear narrative with a headline, supporting points, and a call to action.
Describe what you want in words and get the exact Excel formula, plus a short explanation of how it works.
Plans a pivot table to answer a specific question from your data.
Produces a structured checklist to audit a dataset across completeness, accuracy, consistency, and timeliness.
Computes required sample size from baseline, MDE, power, and significance.
Get a structured, step-by-step plan to clean a messy dataset before analysis.
Audit before you install
Run any source through our checks - AI visibility, security, performance, and stack detection.
Automated Web Security Scan
security
PageSpeed Analyzer
performance
AI Content Quality Test
arabic content
AI Agent / MCP Server Tester
ai testing
Site Stack Detector
migration
AI SEO / AEO / GEO Audit
ai visibility
llms.txt Generator
ai visibility
Readability Score
arabic content
Schema / JSON-LD Builder
ai visibility
AI Cost Calculator
ai testing
Headline Analyzer
arabic content