# Why is this @vlplot blank?

**URL:** <https://discourse.julialang.org/t/why-is-this-vlplot-blank/64369>\
**Category:** General Usage\
**Tags:** plotting, vegalite\
**Created:** [July 9, 2021, 5:35pm UTC](https://discourse.julialang.org/t/why-is-this-vlplot-blank/64369 "2021-07-09T17:35:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [July 9, 2021, 5:35pm UTC](https://discourse.julialang.org/t/why-is-this-vlplot-blank/64369/1 "2021-07-09T17:35:54Z")

</div>

I use this command:

```julia
DataFramesMeta.@select(@where(dftrans, .! ismissing.(:PreScore) .& .! ismissing.(:Group)), :Group,PreScore = Float64.(:PreScore)) |> @vlplot(mark={:area, fillOpacity=.5},x={"PreScore:q",scale={domain=[0,50]}},y="density:q",color="Group:n", transform = [{density = "PreScore",bandwidth=.5,groupby=["Group"]}])

```

Which gives me the following useless plot:

![image](https://global.discourse-cdn.com/julialang/original/3X/3/b/3bf44191802d641dbbe374f820bf6c233571a565.png)

When I click to show the compiled vegalite code it’s as follows in the details section: This looks ok to me?

> **The Compiled VegaLite**
>
> ```julia
> {
> "$schema": "https://vega.github.io/schema/vega/v5.json",
> "background": "white",
> "padding": 5,
> "width": 200,
> "height": 200,
> "style": "cell",
> "data": [
> {
> "name": "source_0",
> "values": [
> {"Group": "Experimental", "PreScore": 22},
> {"Group": "Experimental", "PreScore": 29},
> {"Group": "Experimental", "PreScore": 27},
> {"Group": "Experimental", "PreScore": 26},
> {"Group": "Experimental", "PreScore": 19},
> {"Group": "Experimental", "PreScore": 20},
> {"Group": "Experimental", "PreScore": 22},
> {"Group": "Experimental", "PreScore": 23},
> {"Group": "Experimental", "PreScore": 22},
> {"Group": "Experimental", "PreScore": 21},
> {"Group": "Experimental", "PreScore": 24},
> {"Group": "Experimental", "PreScore": 24},
> {"Group": "Experimental", "PreScore": 26},
> {"Group": "Experimental", "PreScore": 20},
> {"Group": "Experimental", "PreScore": 13},
> {"Group": "Experimental", "PreScore": 27},
> {"Group": "Experimental", "PreScore": 21},
> {"Group": "Experimental", "PreScore": 22},
> {"Group": "Experimental", "PreScore": 35},
> {"Group": "Experimental", "PreScore": 23},
> {"Group": "Experimental", "PreScore": 25},
> {"Group": "Experimental", "PreScore": 24},
> {"Group": "Experimental", "PreScore": 27},
> {"Group": "Experimental", "PreScore": 22},
> {"Group": "Experimental", "PreScore": 24},
> {"Group": "Experimental", "PreScore": 24},
> {"Group": "Experimental", "PreScore": 28},
> {"Group": "Experimental", "PreScore": 18},
> {"Group": "Experimental", "PreScore": 26},
> {"Group": "Experimental", "PreScore": 22},
> {"Group": "Experimental", "PreScore": 34},
> {"Group": "Experimental", "PreScore": 25},
> {"Group": "Experimental", "PreScore": 21},
> {"Group": "Experimental", "PreScore": 23},
> {"Group": "Experimental", "PreScore": 23},
> {"Group": "Experimental", "PreScore": 20},
> {"Group": "Experimental", "PreScore": 26},
> {"Group": "Experimental", "PreScore": 21},
> {"Group": "Experimental", "PreScore": 20},
> {"Group": "Experimental", "PreScore": 19},
> {"Group": "Experimental", "PreScore": 25},
> {"Group": "Experimental", "PreScore": 29},
> {"Group": "Experimental", "PreScore": 32},
> {"Group": "Experimental", "PreScore": 26},
> {"Group": "Experimental", "PreScore": 20},
> {"Group": "Experimental", "PreScore": 19},
> {"Group": "Experimental", "PreScore": 26},
> {"Group": "Experimental", "PreScore": 15},
> {"Group": "Experimental", "PreScore": 27},
> {"Group": "Experimental", "PreScore": 17},
> {"Group": "Experimental", "PreScore": 21},
> {"Group": "Experimental", "PreScore": 26},
> {"Group": "Experimental", "PreScore": 22},
> {"Group": "Experimental", "PreScore": 25},
> {"Group": "Experimental", "PreScore": 29},
> {"Group": "Experimental", "PreScore": 26},
> {"Group": "Experimental", "PreScore": 28},
> {"Group": "Experimental", "PreScore": 28},
> {"Group": "Experimental", "PreScore": 26},
> {"Group": "Experimental", "PreScore": 24},
> {"Group": "Experimental", "PreScore": 25},
> {"Group": "Experimental", "PreScore": 27},
> {"Group": "Experimental", "PreScore": 18},
> {"Group": "Experimental", "PreScore": 29},
> {"Group": "Experimental", "PreScore": 17},
> {"Group": "Experimental", "PreScore": 26},
> {"Group": "Experimental", "PreScore": 23},
> {"Group": "Experimental", "PreScore": 30},
> {"Group": "Experimental", "PreScore": 17},
> {"Group": "Experimental", "PreScore": 19},
> {"Group": "Experimental", "PreScore": 14},
> {"Group": "Experimental", "PreScore": 20},
> {"Group": "Experimental", "PreScore": 21},
> {"Group": "Experimental", "PreScore": 23},
> {"Group": "Experimental", "PreScore": 14},
> {"Group": "Experimental", "PreScore": 24},
> {"Group": "Experimental", "PreScore": 26},
> {"Group": "Experimental", "PreScore": 23},
> {"Group": "Experimental", "PreScore": 22},
> {"Group": "Experimental", "PreScore": 25},
> {"Group": "Experimental", "PreScore": 24},
> {"Group": "Experimental", "PreScore": 20},
> {"Group": "Experimental", "PreScore": 23},
> {"Group": "Experimental", "PreScore": 25},
> {"Group": "Experimental", "PreScore": 24},
> {"Group": "Experimental", "PreScore": 21},
> {"Group": "Experimental", "PreScore": 21},
> {"Group": "Experimental", "PreScore": 28},
> {"Group": "Experimental", "PreScore": 31},
> {"Group": "Experimental", "PreScore": 29},
> {"Group": "Experimental", "PreScore": 25},
> {"Group": "Experimental", "PreScore": 23},
> {"Group": "Experimental", "PreScore": 13},
> {"Group": "Experimental", "PreScore": 19},
> {"Group": "Experimental", "PreScore": 22},
> {"Group": "Experimental", "PreScore": 21},
> {"Group": "Experimental", "PreScore": 25},
> {"Group": "Experimental", "PreScore": 24},
> {"Group": "Experimental", "PreScore": 28},
> {"Group": "Experimental", "PreScore": 21},
> {"Group": "Experimental", "PreScore": 24},
> {"Group": "Experimental", "PreScore": 23},
> {"Group": "Experimental", "PreScore": 23},
> {"Group": "Experimental", "PreScore": 24},
> {"Group": "Experimental", "PreScore": 27},
> {"Group": "Experimental", "PreScore": 23},
> {"Group": "Experimental", "PreScore": 23},
> {"Group": "Experimental", "PreScore": 24},
> {"Group": "Experimental", "PreScore": 15},
> {"Group": "Experimental", "PreScore": 25},
> {"Group": "Experimental", "PreScore": 30},
> {"Group": "Experimental", "PreScore": 28},
> {"Group": "Experimental", "PreScore": 28},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 19},
> {"Group": "Control", "PreScore": 28},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 28},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 28},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 32},
> {"Group": "Control", "PreScore": 29},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 28},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 17},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 19},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 19},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 17},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 27},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 29},
> {"Group": "Control", "PreScore": 27},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 26},
> {"Group": "Control", "PreScore": 19},
> {"Group": "Control", "PreScore": 26},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 26},
> {"Group": "Control", "PreScore": 33},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 19},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 27},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 18},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 18},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 19},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 19},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 39},
> {"Group": "Control", "PreScore": 18},
> {"Group": "Control", "PreScore": 29},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 17},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 28},
> {"Group": "Control", "PreScore": 17},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 19},
> {"Group": "Control", "PreScore": 15},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 17},
> {"Group": "Control", "PreScore": 27},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 16},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 13},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 16},
> {"Group": "Control", "PreScore": 16},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 36},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 15},
> {"Group": "Control", "PreScore": 28},
> {"Group": "Control", "PreScore": 29},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 17},
> {"Group": "Control", "PreScore": 29},
> {"Group": "Control", "PreScore": 28},
> {"Group": "Control", "PreScore": 27},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 18},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 18},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 26},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 28},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 17},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 26},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 27},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 27},
> {"Group": "Control", "PreScore": 15},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 15},
> {"Group": "Control", "PreScore": 26},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 16},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 26},
> {"Group": "Control", "PreScore": 26},
> {"Group": "Control", "PreScore": 28},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 17},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 35},
> {"Group": "Control", "PreScore": 14},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 17},
> {"Group": "Control", "PreScore": 16},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 32},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 19},
> {"Group": "Control", "PreScore": 28},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 28},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 16},
> {"Group": "Control", "PreScore": 18},
> {"Group": "Control", "PreScore": 27},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 28},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 32},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 33},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 19},
> {"Group": "Control", "PreScore": 26},
> {"Group": "Control", "PreScore": 38},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 18},
> {"Group": "Control", "PreScore": 16},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 31},
> {"Group": "Control", "PreScore": 18},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 19},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 27},
> {"Group": "Control", "PreScore": 16},
> {"Group": "Control", "PreScore": 27},
> {"Group": "Control", "PreScore": 30},
> {"Group": "Control", "PreScore": 30},
> {"Group": "Control", "PreScore": 26},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 30},
> {"Group": "Control", "PreScore": 31},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 19},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 18},
> {"Group": "Control", "PreScore": 19},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 9},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 28},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 19},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 25},
> {"Group": "Control", "PreScore": 17},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 26},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 17},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 28},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 26},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 27},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 29},
> {"Group": "Control", "PreScore": 22},
> {"Group": "Control", "PreScore": 29},
> {"Group": "Control", "PreScore": 15},
> {"Group": "Control", "PreScore": 14},
> {"Group": "Control", "PreScore": 21},
> {"Group": "Control", "PreScore": 24},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 26},
> {"Group": "Control", "PreScore": 23},
> {"Group": "Control", "PreScore": 20},
> {"Group": "Control", "PreScore": 27},
> {"Group": "Control", "PreScore": 29}
> ]
> },
> {
> "name": "data_0",
> "source": "source_0",
> "transform": [
> {
> "type": "formula",
> "expr": "toNumber(datum[\"PreScore\"])",
> "as": "PreScore"
> },
> {
> "type": "kde",
> "field": "PreScore",
> "bandwidth": 0.5,
> "groupby": ["Group"],
> "as": ["value", "density"]
> }
> ]
> }
> ],
> "marks": [
> {
> "name": "pathgroup",
> "type": "group",
> "from": {
> "facet": {
> "name": "faceted_path_main",
> "data": "data_0",
> "groupby": ["Group"]
> }
> },
> "encode": {
> "update": {
> "width": {"field": {"group": "width"}},
> "height": {"field": {"group": "height"}}
> }
> },
> "marks": [
> {
> "name": "marks",
> "type": "area",
> "style": ["area"],
> "sort": {"field": "datum[\"PreScore\"]"},
> "from": {"data": "faceted_path_main"},
> "encode": {
> "update": {
> "fillOpacity": {"value": 0.5},
> "orient": {"value": "vertical"},
> "fill": {"scale": "color", "field": "Group"},
> "description": {
> "signal": "\"PreScore: \" + (format(datum[\"PreScore\"], \"\")) + \"; density: \" + (format(datum[\"density\"], \"\")) + \"; Group: \" + (isValid(datum[\"Group\"]) ? datum[\"Group\"] : \"\"+datum[\"Group\"])"
> },
> "x": {"scale": "x", "field": "PreScore"},
> "y": {"scale": "y", "field": "density"},
> "y2": {"scale": "y", "value": 0},
> "defined": {
> "signal": "isValid(datum[\"PreScore\"]) && isFinite(+datum[\"PreScore\"]) && isValid(datum[\"density\"]) && isFinite(+datum[\"density\"])"
> }
> }
> }
> }
> ]
> }
> ],
> "scales": [
> {
> "name": "x",
> "type": "linear",
> "domain": [0, 50],
> "range": [0, {"signal": "width"}],
> "nice": true,
> "zero": true
> },
> {
> "name": "y",
> "type": "linear",
> "domain": {"data": "data_0", "field": "density"},
> "range": [{"signal": "height"}, 0],
> "nice": true,
> "zero": true
> },
> {
> "name": "color",
> "type": "ordinal",
> "domain": {"data": "data_0", "field": "Group", "sort": true},
> "range": "category"
> }
> ],
> "axes": [
> {
> "scale": "x",
> "orient": "bottom",
> "gridScale": "y",
> "grid": true,
> "tickCount": {"signal": "ceil(width/40)"},
> "domain": false,
> "labels": false,
> "aria": false,
> "maxExtent": 0,
> "minExtent": 0,
> "ticks": false,
> "zindex": 0
> },
> {
> "scale": "y",
> "orient": "left",
> "gridScale": "x",
> "grid": true,
> "tickCount": {"signal": "ceil(height/40)"},
> "domain": false,
> "labels": false,
> "aria": false,
> "maxExtent": 0,
> "minExtent": 0,
> "ticks": false,
> "zindex": 0
> },
> {
> "scale": "x",
> "orient": "bottom",
> "grid": false,
> "title": "PreScore",
> "labelFlush": true,
> "labelOverlap": true,
> "tickCount": {"signal": "ceil(width/40)"},
> "zindex": 0
> },
> {
> "scale": "y",
> "orient": "left",
> "grid": false,
> "title": "density",
> "labelOverlap": true,
> "tickCount": {"signal": "ceil(height/40)"},
> "zindex": 0
> }
> ],
> "legends": [{"fill": "color", "symbolType": "circle", "title": "Group"}]
> }
> 
> ```

Perhaps @davidanthoff has some idea?

I think the compiled VegaLite shows that it’s not the data manipulation, because the data seems fine in the JSON.

---

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [July 9, 2021, 7:04pm UTC](https://discourse.julialang.org/t/why-is-this-vlplot-blank/64369/2 "2021-07-09T19:04:34Z")

</div>

Here’s a minimal example of the same problem without the need for my data:

```julia
DataFrame(Group=["Experimental","Experimental","Experimental","Experimental","Control","Control","Control","Control"],
PreScore=rand(Normal(0,1),8)) |> @vlplot(mark={:area, fillOpacity=.5},x={"PreScore:q",scale={domain=[-3,3]}},y="density:q",color="Group:n", transform = [{density = "PreScore",bandwidth=.5,groupby=["Group"]}])

```

---

<div class="post-metadata">

**Author:** ![George9000](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/george9000/32/23619_2.png) [@George9000](https://discourse.julialang.org/u/George9000)\
**Post date:** [July 11, 2021, 2:57am UTC](https://discourse.julialang.org/t/why-is-this-vlplot-blank/64369/3 "2021-07-11T02:57:48Z")

</div>

```julia
using DataFrames, VegaLite, Distributions

df = DataFrame(Group = ["Experimental","Experimental","Experimental","Experimental","Control","Control","Control","Control"], PreScore = rand(Normal(0, 1), 8))

df |> @vlplot(
    width=400,
    height=100,
    mark = {:area, opacity = 0.5},
    transform=[{density = "PreScore",
                bandwidth = 0.5,
                groupby = ["Group"],
                extent=[-3, 3],
                counts=true, steps=50}],
    x={"value:q", title="PreScore"},
    y= {"density:q",stack=true},
    color={"Group:n", scale={scheme=:category20}}
    )

```

![density](https://global.discourse-cdn.com/julialang/original/3X/5/8/5862113bc3a92d607f169477e2b7e0c419ef2076.png)

I think the key bit was `x={"value:q",...`

I followed the example [here](https://www.queryverse.org/VegaLite.jl/stable/examples/examples_histograms/#Stacked-Density-Estimates-1).

---

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [July 11, 2021, 3:45am UTC](https://discourse.julialang.org/t/why-is-this-vlplot-blank/64369/4 "2021-07-11T03:45:42Z")

</div>

Hmm… adding value:

> [@dlakelan](#):
>
> `x={"PreScore:q"`

I’m using the :q above in the minimal example, and still blank…

oh wait, you’re saying “value:q” weird. That doesn’t seem to work for me either.

---

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [July 11, 2021, 3:57am UTC](https://discourse.julialang.org/t/why-is-this-vlplot-blank/64369/5 "2021-07-11T03:57:22Z")

</div>

Ok, weird. the thing that’s really getting me borked is that the DataFrame I’m working with actually has a column named “value” that I’m trying to do the density plot on… if I use your tip with the minimal example, it does work:

```julia
DataFrame(Group=["Experimental","Experimental","Experimental","Experimental","Control","Control","Control","Control"],
PreScore=rand(Normal(0,1),8)) |> @vlplot(mark={:area, fillOpacity=.5},x={"value:q",scale={domain=[-3,3]}},y="density:q",color="Group:n", transform = [{density = "PreScore",bandwidth=.5,groupby=["Group"]}])

```

that works…

I’ll have to see what’s going wrong in my “real” example.

---

<div class="post-metadata">

**Author:** ![George9000](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/george9000/32/23619_2.png) [@George9000](https://discourse.julialang.org/u/George9000)\
**Post date:** [July 11, 2021, 5:40am UTC](https://discourse.julialang.org/t/why-is-this-vlplot-blank/64369/6 "2021-07-11T05:40:34Z")

</div>

Take a look at this example in the online Vega/Vega-lite editor [here](https://vega.github.io/editor/#/examples/vega-lite/area_density_stacked). For local use, I have cloned and built both [Vega](https://github.com/vega/vega) and the [editor](https://github.com/vega/editor) according to the github instructions without problem. And there’s a lot of info at the main [site](https://vega.github.io/). In your case, and for this area/density encoding, if your column is named value, I suspect the encoding for x will look something like this:

```julia
"x": {"field": "value", "title": "Value"}

```

which I believe is saying take the value of the datum in the Value column. This goes against what I’ve done in other plots, like a time series, where the x `field` is the name of the column. Guess it’s time to dig into the documentation on the main Vega site.
