Built with blockbuilder.org
Last active
October 9, 2019 19:49
-
-
Save jwilber/d02e4381d776fb9a7bcb126d3b32c85b to your computer and use it in GitHub Desktop.
roughViz Scatter Demo
This file contains 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
license: mit |
This file contains 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
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://unpkg.com/rough-viz@1.0.4"></script> | |
<style> | |
.wrapper { | |
display: flex; | |
flex: wrap; | |
order: row; | |
} | |
</style> | |
</head> | |
<body> | |
<br><br> | |
<div class="wrapper"> | |
<div id="vis0"></div> | |
<div id="vis1"></div> | |
</div> | |
<script> | |
new roughViz.Scatter( | |
{ | |
element: '#vis0', | |
data: 'https://raw.githubusercontent.com/uiuc-cse/data-fa14/gh-pages/data/iris.csv', | |
title: 'Iris Scatter Plot', | |
x: 'sepal_width', | |
y: 'petal_length', | |
colorVar: 'species', | |
highlightLabel: 'species', | |
fillWeight: 4, | |
radius: 12, | |
colors: ['pink', 'coral', 'skyblue'], | |
stroke: 'black', | |
strokeWidth: 0.4, | |
roughness: 1, | |
width: 400, | |
height: 450, | |
font: 0, | |
xLabel: 'sepal width', | |
yLabel: 'petal length', | |
curbZero: false, | |
}) | |
new roughViz.Scatter( | |
{ | |
element: '#vis1', | |
data: { | |
x: [1, 2, 3, 7, 5, 9], | |
y: [240, 40, 40, 160, 100], | |
}, | |
title: 'Some Random (x,y) Data', | |
width: 400, | |
roughness: 0, | |
radius: [25, 10, 40, 30, 60], | |
fillWeight: 3, | |
axisRoughness: 1, | |
height: 450, | |
colors: ['green', 'red', 'blue', 'black'] | |
} | |
); | |
</script> | |
</body> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment