Sunday, November 29, 2026
Seedance 2.0 Mini · $0.07/sFLUX.2 Pro · $0.045/imgNano Banana Pro 2K · $0.134Wan 3.0 720p · $0.12/sHiggsfield Starter · $19 / 270 cr Prices checked Nov 9

Guide · AI tools

Claude writes code to draw its charts: 3 ways to use it, and prompts that keep the numbers right

Claude has no image model. Its charts and diagrams are HTML, SVG or Python it writes and runs. Here are the three places that happens and prompts that keep the numbers right.

The short version

  • Claude has no image model: every chart or diagram it shows you is code (HTML, SVG or a Python script) that it writes and then renders.
  • Inline visuals have been in beta since 12 March 2026 on every plan, including Free, but only on web and desktop, not the phone apps.
  • For a file you can drop into a deck, turn on Code execution and file creation and Claude saves charts as PNG, up to 30 MB a file.
  • The reliable prompt gives Claude the data, names the chart and the output format, and asks it to print the table it plotted.
In this article · 6 sections
  1. 01Why it's code and not pixels
  2. 02Way 1: inline visuals in the chat
  3. 03Way 2: artifacts and Claude Design, for things you keep
  4. 04Way 3: real files, with Python running in the background
  5. 05Prompts for charts that don't lie
  6. 06When to use something else
Ink illustration of a hand whose pen line turns into a bar chart with code brackets, next to the numbers 3 ways, 30 MB per file and $0 on the Free plan
Art: FLUX.2 Pro via the Black Forest Labs API. The text on the card is set by us, not generated.

Claude doesn't generate images. When it shows you a chart, a flowchart or a little interactive periodic table, it has written code, usually HTML and SVG, and the Claude app renders that code like a small web page. That's why it can draw a clean diagram but not a photo. It also gives you a simple way to get reliable visuals: prompt it like a programmer. Hand over the data, name the output, and ask it to show what it plotted.

This guide covers the three places Claude draws with code, what each one costs you, and prompts you can copy.

Why it's code and not pixels

Image models such as Nano Banana or FLUX paint pixels. Claude writes instructions: "a rectangle 120 wide here, a label there, a line from this point to that one." Anthropic's help page says Claude builds its custom visuals with HTML, "the same building blocks as web pages", so they're interactive rather than static images.

That trade-off decides what to ask for:

You want Claude (code) An image model (pixels)
Bar, line or pie chart from your numbers Good: the numbers stay exact Bad: it invents bar heights
Flowchart, org chart, timeline Good Text often garbles
Slider you can drag ("what if the rate is 6%?") Good Impossible
Logo sketch, icon, flat illustration Workable (SVG) Better
Photo, realistic scene, product shot No Yes

If you want photos inside Claude, they come from a connector that calls an image model, such as the Nano Banana connectors third parties sell. That's a different tool calling a different model, and it isn't Claude drawing.

Way 1: inline visuals in the chat

Since 12 March 2026, Claude can drop charts and diagrams straight into its answer. Anthropic launched it in beta on all plan types and added it to Cowork on paid plans on 22 April. There's nothing to switch on. Claude decides when a visual helps, or you ask.

What to know before you rely on it:

  • Web and desktop only. The help page says visuals don't render in the iOS or Android apps. People you share the chat with see them only on web or desktop, and only when logged in.
  • They're temporary. A visual can change or disappear as the chat goes on. To keep one, copy it as an image, download it as .svg or .html, or save it as an artifact.
  • You can click them. Buttons and sliders work, and in chat a click inside the visual sends a follow-up prompt for you. Cowork doesn't have that yet.
  • The model matters. Anthropic's tips say Opus does best at visualization tasks, and its list of limitations notes that Claude may not always draw when you expect it to, so ask explicitly.

Inline visuals run on the Free plan, and neither Anthropic page lists a separate charge for them. Our guide to Claude usage limits covers what drains a plan fastest.

Way 2: artifacts and Claude Design, for things you keep

An artifact is the permanent version: a standalone HTML page or React component in the side panel that you can edit, share and come back to. Ask for one when the chart is going into a report or onto a dashboard, not just helping you think.

Claude Design is the same idea scaled up to slides and layouts. Anthropic lists it on all plans, including Free, with export to PPTX, PDF or HTML. The page warns that artifacts and Design work count toward your plan's usage limits, and that a full deck uses more of your limit than a typical message.

Way 3: real files, with Python running in the background

For a PNG you can paste into Google Slides, or a chart inside an Excel file, turn on Settings > Capabilities > Code execution and file creation (called "Create and edit files" in the newer settings layout). Anthropic's help page says the feature is available on every plan, from Free to Enterprise. With it on, Claude writes Python, runs it in a sandbox and hands you the file. It "can create data visualizations in image files like PNG", along with xlsx, pptx, docx and pdf files.

Limits from the same page:

  • 30 MB per file, uploads and downloads.
  • Creating files uses more of your limit than a normal chat.
  • On Team and Enterprise, the admin controls whether the sandbox can reach the internet. The default depends on the plan and the admin settings.

This is the best route when you upload a CSV. The script reads your actual file, so the chart is drawn from your numbers, not from Claude's memory of them. If you work in a terminal, Claude Code does the same thing on your own machine: ask it to write a plotting script, run it and save the image to your repo. Our Claude pricing guide lists what each plan includes.

Prompts for charts that don't lie

The usual failure isn't an ugly chart. It's a good-looking one with a made-up number. A model writing chart code from a vague request will fill gaps, so close them. Each prompt below gives the data, names the chart and the output, and asks for a check.

A chart from numbers you paste:

Make a bar chart from exactly this data. Do not add, round or estimate any values.

Month, Signups
Jan, 412
Feb, 389
Mar, 517
Apr, 603

Vertical bars, months on the x-axis, "Signups" on the y-axis starting at 0.
Label each bar with its exact value. One color: #C0392B. No title.
Under the chart, print the table of values you actually plotted.

The last line is the important one. If the table under the chart doesn't match what you pasted, the chart is wrong, and you catch it in five seconds.

A chart from an uploaded CSV, saved as a file:

Using the attached CSV, run Python to make a line chart of the "revenue" column by "date".
Save it as a PNG, 1600x900 pixels, white background, large axis labels for a slide.
Before plotting, print the number of rows, the first and last date, and the min and max revenue,
so I can check you read the file correctly. Then give me the PNG to download.

A diagram of a process:

Draw this as a flowchart, top to bottom: a support ticket comes in, a bot tries to answer,
if the customer says it's solved the ticket closes, otherwise it goes to a human, and if the human
can't fix it in 24 hours it goes to an engineer. Use only these steps, no extras.
Rounded boxes for steps, diamonds for decisions, label every arrow.
Make it downloadable as SVG.

An interactive explainer:

Show me how compound interest grows with an interactive chart: sliders for starting amount
(0 to 50,000), yearly rate (0 to 10%) and years (1 to 40). Show the final amount as a number
above the chart. Plain styling, no animation.

Three habits help with all of them:

  • Say the format. "SVG", "PNG at 1600x900" or "an artifact" gets you something you can use, not a visual that vanishes when the chat moves on.
  • Set a style once. The help page says that if you tell Claude a preference, such as a color, it remembers it. Put your brand colors in early.
  • Edit like text. "Switch it to monthly", "drop the gridlines", "make the labels bigger". Each change is an edit to the code, so the numbers you already checked stay put.

When to use something else

If the job is a photo, a realistic product shot or artwork with texture, Claude is the wrong tool, and asking it to "draw" one gets you flat SVG shapes at best. Use an image model for that. For anything made of numbers, boxes and arrows, code is the better medium: you can read what Claude wrote and check it, which you can't do with pixels.