Bubble Charts
A bubble chart is a scatter plot where marker size represents a third dimension of the data. Bubble charts show two columns on the x and y axes, with marker sizes proportional to a third numeric column.
Basic bubble chart example
Here's an example of how to create a basic bubble chart.
Create a bubble chart of <X> vs. <Y>. Size by <Column>.
The following example uses this prompt structure with the weight, length, and shipping_time columns from the built-in Plotly Studio dataset:
Create a bubble chart of weight vs. length. Size by shipping time.
Shipping time is calculated as the difference between
shipped date and created date in days.

Bubble chart with color dimension
Add color to a bubble chart to represent a fourth column.
Create a bubble chart of <X> vs. <Y>. Size by <Column>, color by <Column>.
The following example uses this prompt structure with the weight, length, shipping_time, and defect columns from the built-in Plotly Studio dataset:
Create a bubble chart of weight vs. length.
Size by shipping time, color by defect.
Shipping time is calculated as the difference between
shipped date and created date in days.

Bubble chart with continuous color scale
Use a continuous color scale to map numeric values to color gradients.
Create a bubble chart of <X> vs. <Y>.
Size by <Column>, color by <Column>.
Use <scale_name> color scale.
The following example uses this prompt structure with the weight, length, and shipping_time columns from the built-in Plotly Studio dataset, using shipping_time for both size and color:
Create a bubble chart of weight vs. length.
Size by shipping time, color by shipping time.
Shipping time is calculated as the difference between
shipped date and created date in days.
Use Viridis color scale.

Interactive controls
Add dropdowns and other controls to make your bubble charts interactive. Controls let users filter and explore the data dynamically.
Create a bubble chart of weight vs. length.
Size by shipping time, color by defect.
Shipping time is calculated as the difference between
shipped date and created date in days.
Add a dropdown to select factory
(All, Osaka, Seoul, Singapore, Los Angeles, Montreal, Randstad) - Default All.
Add a dropdown to filter by weight range (All, 0-1 kg, 1-2 kg, 2-3 kg) - Default All.

Prompt keywords reference
Use these keywords and phrases in your prompts to customize your bubble chart.
Chart
Here are some keyword suggestions to create and customize a chart:
| Keyword/Phrase | Description | Example |
|---|---|---|
| X | The variable to show on the horizontal axis | weight |
| Y | The variable to show on the vertical axis | length |
| Size | Make bubble sizes proportional to a numeric variable | size by shipping time |
| Color | Color bubbles by different groups or continuous values | color by factory location |
| Facet columns | Create multiple subplots side-by-side for each category | facet by factory location |
| Facet rows | Create multiple plots stacked vertically by group | facet vertically by defect |
Data
Specify data instructions in your prompt to transform, filter, or aggregate your data before visualization.
Calculate shipping time as the difference between
shipped date and created date in days.
Average weight by factory location.
Here are some keyword suggestions:
| Keyword/Phrase | Description | Example |
|---|---|---|
| Aggregation | Specify how to aggregate data | average weight by factory location |
| Computed field | Create new calculated fields from existing data | calculate shipping time as the difference between shipped date and created date in days |
| Filter | Filter data to show only specific records | filter to show only defect = true |
Options
Specify options in your prompt to add interactive controls that allow users to dynamically filter, transform, and visualize data without regenerating the chart.
Add a dropdown to select factory (All, Osaka, Seoul) - Default All.
Add a dropdown to filter by weight range (All, 0-1 kg, 1-2 kg, 2-3 kg) - Default All.
Here are some keyword suggestions. See App Controls for a complete list of control types and additional examples.
| Keyword/Phrase | Description | Example |
|---|---|---|
| Dropdown | Add a dropdown menu to filter by categories | Add a dropdown to select factory (All, Osaka, Seoul) - Default All |
Chart styles
Specify chart styles in your prompt to control the visual appearance and formatting of your bubble chart.
Use custom colors: #FF5733, #33FF57, #3357FF.
Use Viridis color scale.
Set opacity to 0.6.
Add a linear trend line.
Here are some keyword suggestions:
| Keyword/Phrase | Description | Example |
|---|---|---|
| Custom colors | Specify exact colors for categories or gradients | Use custom colors: #FF5733, #33FF57, #3357FF |
| Color scale | Specify color scale for continuous color mapping. See built-in color scales | Use Viridis color scale |
| Reverse color scale | Flip the direction of the color scale | Reverse color scale |
| Opacity | How see-through the bubbles are (0=invisible, 1=solid) | Set opacity to 0.6 |
| Max bubble size | Set the maximum size for bubbles | Set maximum bubble size to 50 |
| Hover text | What to show when hovering over bubbles | Show serial number on hover |
| Axis labels | Rename axis labels to be more readable | Label x-axis as "Product Weight (kg)"Label y-axis as "Product Length (cm)" |
| Trend line | Add a line showing the overall trend | Add a linear trend line |
| Logarithmic scale | Use log scale for large ranges (useful for exponential data) | Use logarithmic scale for the y-axis |
| Axis range | Set minimum and maximum values for axes | Set x-axis range from 0 to 3 |
| Legend | Control legend display and position | Show legend at top right |