{ "$schema": "https://vega.github.io/schema/vega/v5.json", "background": "white", "padding": 5, "height": 200, "data": [ { "name": "source_0", "url": "data/normal-2d.json", "format": {"type": "json"}, "transform": [ {"type": "quantile", "field": "u", "step": 0.01, "as": ["p", "v"]}, {"type": "formula", "expr": "quantileUniform(datum.p)", "as": "unif"}, {"type": "formula", "expr": "quantileNormal(datum.p)", "as": "norm"} ] }, { "name": "data_0", "source": "source_0", "transform": [ { "type": "filter", "expr": "isValid(datum[\"unif\"]) && isFinite(+datum[\"unif\"]) && isValid(datum[\"v\"]) && isFinite(+datum[\"v\"])" } ] }, { "name": "data_1", "source": "source_0", "transform": [ { "type": "filter", "expr": "isValid(datum[\"norm\"]) && isFinite(+datum[\"norm\"]) && isValid(datum[\"v\"]) && isFinite(+datum[\"v\"])" } ] } ], "signals": [{"name": "childWidth", "value": 200}], "layout": {"padding": 20, "bounds": "full", "align": "each"}, "marks": [ { "type": "group", "name": "concat_0_group", "style": "cell", "encode": { "update": { "width": {"signal": "childWidth"}, "height": {"signal": "height"} } }, "marks": [ { "name": "concat_0_marks", "type": "symbol", "style": ["point"], "from": {"data": "data_0"}, "encode": { "update": { "opacity": {"value": 0.7}, "fill": {"value": "transparent"}, "stroke": {"value": "#4c78a8"}, "ariaRoleDescription": {"value": "point"}, "description": { "signal": "\"unif: \" + (format(datum[\"unif\"], \"\")) + \"; v: \" + (format(datum[\"v\"], \"\"))" }, "x": {"scale": "concat_0_x", "field": "unif"}, "y": {"scale": "concat_0_y", "field": "v"} } } } ], "axes": [ { "scale": "concat_0_x", "orient": "bottom", "gridScale": "concat_0_y", "grid": true, "tickCount": {"signal": "ceil(childWidth/40)"}, "domain": false, "labels": false, "aria": false, "maxExtent": 0, "minExtent": 0, "ticks": false, "zindex": 0 }, { "scale": "concat_0_y", "orient": "left", "gridScale": "concat_0_x", "grid": true, "tickCount": {"signal": "ceil(height/40)"}, "domain": false, "labels": false, "aria": false, "maxExtent": 0, "minExtent": 0, "ticks": false, "zindex": 0 }, { "scale": "concat_0_x", "orient": "bottom", "grid": false, "title": "unif", "labelFlush": true, "labelOverlap": true, "tickCount": {"signal": "ceil(childWidth/40)"}, "zindex": 0 }, { "scale": "concat_0_y", "orient": "left", "grid": false, "title": "v", "labelOverlap": true, "tickCount": {"signal": "ceil(height/40)"}, "zindex": 0 } ] }, { "type": "group", "name": "concat_1_group", "style": "cell", "encode": { "update": { "width": {"signal": "childWidth"}, "height": {"signal": "height"} } }, "marks": [ { "name": "concat_1_marks", "type": "symbol", "style": ["point"], "from": {"data": "data_1"}, "encode": { "update": { "opacity": {"value": 0.7}, "fill": {"value": "transparent"}, "stroke": {"value": "#4c78a8"}, "ariaRoleDescription": {"value": "point"}, "description": { "signal": "\"norm: \" + (format(datum[\"norm\"], \"\")) + \"; v: \" + (format(datum[\"v\"], \"\"))" }, "x": {"scale": "concat_1_x", "field": "norm"}, "y": {"scale": "concat_1_y", "field": "v"} } } } ], "axes": [ { "scale": "concat_1_x", "orient": "bottom", "gridScale": "concat_1_y", "grid": true, "tickCount": {"signal": "ceil(childWidth/40)"}, "domain": false, "labels": false, "aria": false, "maxExtent": 0, "minExtent": 0, "ticks": false, "zindex": 0 }, { "scale": "concat_1_y", "orient": "left", "gridScale": "concat_1_x", "grid": true, "tickCount": {"signal": "ceil(height/40)"}, "domain": false, "labels": false, "aria": false, "maxExtent": 0, "minExtent": 0, "ticks": false, "zindex": 0 }, { "scale": "concat_1_x", "orient": "bottom", "grid": false, "title": "norm", "labelFlush": true, "labelOverlap": true, "tickCount": {"signal": "ceil(childWidth/40)"}, "zindex": 0 }, { "scale": "concat_1_y", "orient": "left", "grid": false, "title": "v", "labelOverlap": true, "tickCount": {"signal": "ceil(height/40)"}, "zindex": 0 } ] } ], "scales": [ { "name": "concat_0_x", "type": "linear", "domain": {"data": "data_0", "field": "unif"}, "range": [0, {"signal": "childWidth"}], "nice": true, "zero": true }, { "name": "concat_0_y", "type": "linear", "domain": {"data": "data_0", "field": "v"}, "range": [{"signal": "height"}, 0], "nice": true, "zero": true }, { "name": "concat_1_x", "type": "linear", "domain": {"data": "data_1", "field": "norm"}, "range": [0, {"signal": "childWidth"}], "nice": true, "zero": true }, { "name": "concat_1_y", "type": "linear", "domain": {"data": "data_1", "field": "v"}, "range": [{"signal": "height"}, 0], "nice": true, "zero": true } ] }