Skip to content

Chart Prompting Guide

This guide can help you write chart prompts that get better results from Plotly Studio and reduce the time from data to app.

Choose a prompting style

You can write chart prompts in Plotly Studio in different conversational ways:

Ask a question:

Which factory produces the heaviest products?

Use a quick one-line prompt:

Compare average weight by factory

Use a more detailed conversational prompt:

Create a bar chart that compares average product weight by factory location.

Questions and one-liners are great for exploring your data when you're not certain what kind of visualization you want. Detailed conversational prompts are useful when you want to be specific about chart type, data columns, aggregation, and style.

You can include all the detail you need in plain natural language. For example:

Build a scatter plot showing product weight on the x-axis and shipping 
days on the y-axis. Color points by factory location, keep each product 
as an individual point (no aggregation), add a dropdown for time range 
with options latest 30 days, latest 90 days, latest year, and all dates 
(default latest 90 days), and set marker opacity to 0.6.

Add detail to prompts

You can improve results by being specific. Include exact field names, detail the aggregations you want, and describe the visual style you need.

Basic prompt:

Show sales over time

More detailed (still conversational):

Show monthly sales as a line chart with markers. Sum revenue by 
month from the order_date column and use blue color.

Each level of detail helps Plotly Studio better understand your requirements and generate the chart you want.

Explore prompt examples

Browse and try examples organized by chart type and functionality.

Examples by chart type

  • Scatter Plots - Each row of data represented by a symbol mark in 2D space
  • Line Charts - Each row of data represented as a vertex of a polyline mark in 2D space
  • Bar Charts - Each row of data represented as a rectangular mark
  • Box Plots - Statistical distributions shown as boxes with quartiles and outliers
  • Pie Charts - Each row of data represented as a sector of a pie
  • Treemaps - Hierarchical data as nested rectangular sectors
  • Heatmaps - Rows of data grouped into colored rectangular tiles to visualize 2D distribution
  • Bubble Charts - Scatter plots with a third dimension represented by marker size
  • Maps - Geospatial data visualized on maps
  • Legends - Control legend visibility, position, orientation, and styling
  • App Controls - Add shared dropdowns, date pickers, and other app-level controls

Use Plotly.py knowledge

Plotly Studio generates Plotly.py code, so you can use technical terms and attribute names directly in your prompts.

Examples:

Create a stacked bar chart of total weight by factory and defect 
category, set marker opacity to 0.6, use circle markers where 
applicable, and hide the legend.

You can reference any Plotly.py parameters like hovertemplate, colorscale, line.width, or layout properties like xaxis.range and yaxis.title.text.

The Plotly.py documentation includes examples of many features available with Plotly charts, and the reference documentation provides lists of parameters.

Track what works

Don't forget, when you find chart prompts that work well, save them for future use!

Share your tips and tricks

Found a prompt pattern that works well? Help the community by sharing your discoveries.

Post your tips, tricks, and examples in the Plotly Studio section of the community forum. We monitor the forum for useful techniques to include in this guide.