Ask Lumen AI for a diverging map:
Show a global heatmap of mean sea level pressure averaged over
time, in hPa. Use a diverging colormap centered on 1013 hPa.
The result is uniform blue. Continents and pressure systems should both be visible against a red/blue split around 1013 hPa; instead nothing is.
Root cause is in the VegaLiteAgent prompt
(lumen/ai/prompts/VegaLiteAgent/main.jinja2):
- Line 40 talks about
scale: {scheme: blues, domain: [min, max]} for sequential schemes when data does not start at zero.
- Line 52 talks about
scale: {domain: [5500, 6000]} for narrow clustered ranges.
- Nothing in the prompt addresses diverging schemes (
redblue, redyellowblue, etc.) or the domainMid property Vega-Lite uses to lock the neutral color to a specific value.
So when the user asks for "diverging colormap centered on 1013", the LLM either picks a sequential scheme or omits the centerpoint. Either way, MSL data has a ~40 hPa span on Earth; without domainMid: 1013 the neutral color drifts away from 1013 and one side of the diverging scale eats the whole map.
Smallest fix: add a one-line pattern note plus a worked example,
something like:
Diverging colormaps: When the user asks for diverging
(redblue, redyellowblue, ...), set both the scheme and a
centerpoint: color: {scale: {scheme: 'redblue', domainMid: 1013}}.
Vega-Lite anchors the neutral color to that value instead of the
data midpoint.
(Optional follow-on: the agent could also auto-detect the word "diverging" or "anomaly" in the user prompt and inject the domainMid heuristic, but the prompt nudge is enough to ship.)
Ask Lumen AI for a diverging map:
The result is uniform blue. Continents and pressure systems should both be visible against a red/blue split around 1013 hPa; instead nothing is.
Root cause is in the VegaLiteAgent prompt
(
lumen/ai/prompts/VegaLiteAgent/main.jinja2):scale: {scheme: blues, domain: [min, max]}for sequential schemes when data does not start at zero.scale: {domain: [5500, 6000]}for narrow clustered ranges.redblue,redyellowblue, etc.) or thedomainMidproperty Vega-Lite uses to lock the neutral color to a specific value.So when the user asks for "diverging colormap centered on 1013", the LLM either picks a sequential scheme or omits the centerpoint. Either way, MSL data has a ~40 hPa span on Earth; without
domainMid: 1013the neutral color drifts away from 1013 and one side of the diverging scale eats the whole map.Smallest fix: add a one-line pattern note plus a worked example,
something like:
(Optional follow-on: the agent could also auto-detect the word "diverging" or "anomaly" in the user prompt and inject the
domainMidheuristic, but the prompt nudge is enough to ship.)