Created
October 2, 2020 09:40
-
-
Save sverhoeven/37befc5375162cb33235a9210ba525a4 to your computer and use it in GitHub Desktop.
run-cpp-on-web: vega
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const equation_line = { | |
"data": {"sequence": {"start": -4, "stop": 4, "step": 0.1, "as": "x"}}, | |
"transform": [ | |
{ | |
"calculate": "2 * datum.x * datum.x * datum.x - 4 * datum.x * datum.x + 6", | |
"as": "y" | |
} | |
], | |
"mark": "line", | |
"encoding": { | |
"x": {"type": "quantitative", "field": "x"}, | |
"y": {"field": "y", "type": "quantitative"}, | |
"color": {"value": "#f00"} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment