Forum Discussion
AdamMG
2 years agoHelper I
Measures - values sorted ASC
Hi everyone. Basically I need to create a scatter plot where I will have x and y sorted ascending and plot against each other, ... so the number are not correlated to each other anymore My table ...
Anonymous
2 years agoNot applicable
Hi AdamMG ,
First, you'll need to create two separate measures for your x and y axes. Once you have your measures or ranked columns ready, you can use them in DENEB with a Vega-Lite specification. Here is a basic example of how you might structure your Vega-Lite JSON to plot the sorted values:
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "A scatterplot showing sorted x and y values.",
"data": {
"name": "dataset"
},
"mark": "point",
"encoding": {
"x": {"field": "SortedX", "type": "quantitative"},
"y": {"field": "SortedY", "type": "quantitative"}
}
}
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.