Skip to content

Commit 7ebe87b

Browse files
committed
Site updated at 2018-02-05 18:20:58 UTC
1 parent 878431b commit 7ebe87b

File tree

953 files changed

+575912
-129143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

953 files changed

+575912
-129143
lines changed

2018/01/16/advanced-violin.html

+569
Large diffs are not rendered by default.

2018/01/16/basic-hist2dcontour.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
var x = [];
2+
var y = [];
3+
for (var i = 0; i < 500; i ++) {
4+
x[i] = Math.random();
5+
y[i] = Math.random() + 1;
6+
}
7+
8+
var data = [
9+
{
10+
x: x,
11+
y: y,
12+
type: 'histogram2dcontour'
13+
}
14+
];
15+
Plotly.newPlot('graph', data);

2018/01/16/basic-violin.html

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Plotly.d3.csv("https://raw.githubusercontent.com/plotly/datasets/master/violin_data.csv", function(err, rows){
2+
3+
function unpack(rows, key) {
4+
return rows.map(function(row) { return row[key]; });
5+
}
6+
7+
var data = [{
8+
type: 'violin',
9+
y: unpack(rows, 'total_bill'),
10+
points: 'none',
11+
box: {
12+
visible: true
13+
},
14+
boxpoints: false,
15+
line: {
16+
color: 'black'
17+
},
18+
fillcolor: '#8dd3c7',
19+
opacity: 0.6,
20+
meanline: {
21+
visible: true
22+
},
23+
x0: "Total Bill"
24+
}]
25+
26+
var layout = {
27+
title: "",
28+
yaxis: {
29+
zeroline: false
30+
}
31+
}
32+
33+
Plotly.plot('graph', data, layout);
34+
});

2018/01/16/grouped-violin.html

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// need to fix data
2+
3+
Plotly.d3.csv("https://raw.githubusercontent.com/plotly/datasets/master/violin_data.csv", function(err, rows){
4+
5+
function unpack(rows, key) {
6+
return rows.map(function(row) { return row[key]; });
7+
}
8+
9+
var data = [{
10+
type: 'violin',
11+
x: unpack(rows, 'day'),
12+
y: unpack(rows, 'total_bill'),
13+
legendgroup: 'M',
14+
scalegroup: 'M',
15+
name: 'M',
16+
box: {
17+
visible: true
18+
},
19+
line: {
20+
color: 'blue',
21+
},
22+
meanline: {
23+
visible: true
24+
}
25+
}, {
26+
type: 'violin',
27+
x: unpack(rows, 'day'),
28+
y: unpack(rows, 'total_bill'),
29+
legendgroup: 'F',
30+
scalegroup: 'F',
31+
name: 'F',
32+
box: {
33+
visible: true
34+
},
35+
line: {
36+
color: 'pink',
37+
},
38+
meanline: {
39+
visible: true
40+
}
41+
}]
42+
43+
var layout = {
44+
title: "Grouped Violin Plot",
45+
yaxis: {
46+
zeroline: false
47+
},
48+
violinmode: 'group'
49+
}
50+
51+
Plotly.plot('graph', data, layout);
52+
});

2018/01/16/horizontal-violin.html

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Plotly.d3.csv("https://raw.githubusercontent.com/plotly/datasets/master/violin_data.csv", function(err, rows){
2+
3+
function unpack(rows, key) {
4+
return rows.map(function(row) { return row[key]; });
5+
}
6+
7+
var data = [{
8+
type: 'violin',
9+
x: unpack(rows, 'total_bill'),
10+
points: 'none',
11+
box: {
12+
visible: true
13+
},
14+
boxpoints: false,
15+
line: {
16+
color: 'black'
17+
},
18+
fillcolor: '#8dd3c7',
19+
opacity: 0.6,
20+
meanline: {
21+
visible: true
22+
},
23+
y0: "Total Bill"
24+
}]
25+
26+
var layout = {
27+
title: "Basic Horizontal Violin Plot",
28+
xaxis: {
29+
zeroline: false
30+
}
31+
}
32+
33+
Plotly.plot('graph', data, layout);
34+
});
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Plotly.d3.csv("https://raw.githubusercontent.com/plotly/datasets/master/violin_data.csv", function(err, rows){
2+
3+
function unpack(rows, key) {
4+
return rows.map(function(row) { return row[key]; });
5+
}
6+
7+
var data = [{
8+
type: 'violin',
9+
x: unpack(rows, 'day'),
10+
y: unpack(rows, 'total_bill'),
11+
points: 'none',
12+
box: {
13+
visible: true
14+
},
15+
line: {
16+
color: 'green',
17+
},
18+
meanline: {
19+
visible: true
20+
},
21+
transforms: [{
22+
type: 'groupby',
23+
groups: unpack(rows, 'day'),
24+
styles: [
25+
{target: 'Sun', value: {line: {color: 'blue'}}},
26+
{target: 'Sat', value: {line: {color: 'orange'}}},
27+
{target: 'Thur', value: {line: {color: 'green'}}},
28+
{target: 'Fri', value: {line: {color: 'red'}}}
29+
]
30+
}]
31+
}]
32+
33+
var layout = {
34+
title: "Multiple Traces Violin Plot",
35+
yaxis: {
36+
zeroline: false
37+
}
38+
}
39+
40+
Plotly.plot('graph', data, layout);
41+
});

2018/01/16/split-violin.html

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
Plotly.d3.csv("https://raw.githubusercontent.com/plotly/datasets/master/violin_data.csv", function(err, rows){
2+
3+
function unpack(rows, key) {
4+
return rows.map(function(row) { return row[key]; });
5+
}
6+
7+
var data = [{
8+
type: 'violin',
9+
x: unpack(rows, 'day'),
10+
y: unpack(rows, 'total_bill'),
11+
legendgroup: 'Yes',
12+
scalegroup: 'Yes',
13+
name: 'Yes',
14+
side: 'negative',
15+
box: {
16+
visible: true
17+
},
18+
line: {
19+
color: 'blue',
20+
width: 2
21+
},
22+
meanline: {
23+
visible: true
24+
}
25+
}, {
26+
type: 'violin',
27+
x: unpack(rows, 'day'),
28+
y: unpack(rows, 'total_bill'),
29+
legendgroup: 'No',
30+
scalegroup: 'No',
31+
name: 'No',
32+
side: 'positive',
33+
box: {
34+
visible: true
35+
},
36+
line: {
37+
color: 'green',
38+
width: 2
39+
},
40+
meanline: {
41+
visible: true
42+
}
43+
}]
44+
45+
var layout = {
46+
title: "Split Violin Plot",
47+
yaxis: {
48+
zeroline: false
49+
},
50+
violingap: 0,
51+
violingroupgap: 0,
52+
violinmode: "overlay",
53+
}
54+
55+
Plotly.plot('graph', data, layout);
56+
});
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
var x = [];
2+
var y = [];
3+
for (var i = 0; i < 500; i ++) {
4+
x[i] = Math.random();
5+
y[i] = Math.random() + 1;
6+
}
7+
8+
var data = [
9+
{
10+
x: x,
11+
y: y,
12+
colorscale: 'Blues',
13+
type: 'histogram2dcontour'
14+
}
15+
];
16+
Plotly.newPlot('graph', data);

2018/01/30/styled-hist2dcontour.html

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
var x = [];
2+
var y = [];
3+
for (var i = 0; i < 500; i ++) {
4+
x[i] = Math.random();
5+
y[i] = Math.random() + 1;
6+
}
7+
8+
var data = [
9+
{
10+
x: x,
11+
y: y,
12+
colorscale: 'Blues',
13+
type: 'histogram2dcontour',
14+
contours: {
15+
showlabels: true,
16+
labelfont: {
17+
family: 'Raleway',
18+
color: 'white'
19+
}
20+
},
21+
hoverlabel: {
22+
bgcolor: 'white',
23+
bordercolor: 'black',
24+
font: {
25+
family: 'Raleway',
26+
color: 'black'
27+
}
28+
}
29+
}
30+
];
31+
Plotly.newPlot('graph', data);
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var trace1 = {
2+
x:['trees', 'flowers', 'hedges'],
3+
y: [90, 130, 40],
4+
type: 'bar'
5+
};
6+
7+
var data = [trace1];
8+
var layout = {
9+
title: 'Remove Modebar Buttons',
10+
showlegend: false};
11+
Plotly.newPlot('myDiv', data, layout, {modeBarButtonsToRemove: ['toImage']});

0 commit comments

Comments
 (0)