Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 59191fd

Browse files
authored
Merge pull request plotly#1302 from plotly/isosurface-docs
Isosurface docs
2 parents 17dc302 + 2999eeb commit 59191fd

10 files changed

+1052
-858
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Basic Isosurface Plot
3+
plot_url: https://codepen.io/plotly/embed/JVMMMq/?height=542&theme-id=15263&default-tab=result
4+
language: plotly_js
5+
suite: isosurface
6+
order: 1
7+
sitemap: false
8+
arrangement: horizontal
9+
---
10+
11+
var data = [
12+
{
13+
type: "isosurface",
14+
x: [0,0,0,0,1,1,1,1],
15+
y: [0,1,0,1,0,1,0,1],
16+
z: [1,1,0,0,1,1,0,0],
17+
value: [1,2,3,4,5,6,7,8],
18+
isomin: 2,
19+
isomax: 6,
20+
colorscale: "Reds"
21+
}
22+
];
23+
24+
var layout = {
25+
margin: {t:0, l:0, b:0},
26+
scene: {
27+
camera: {
28+
eye: {
29+
x: 1.88,
30+
y: -2.12,
31+
z: 0.96
32+
}
33+
}
34+
}
35+
};
36+
37+
Plotly.newPlot(graphDiv, data, layout, {showSendToCloud: true});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Javascript Graphing Library 3D Isosurface Plots | Examples | Plotly
3+
name: 3D Isosurface Plots
4+
permalink: javascript/3d-isosurface-plots/
5+
description: How to make 3D isosurface plots in javascript.
6+
layout: user-guide
7+
thumbnail: thumbnail/isosurface.jpg
8+
language: plotly_js
9+
has_thumbnail: true
10+
display_as: 3d_charts
11+
order: 15.5
12+
---
13+
{% assign examples = site.posts | where:"language","plotly_js" | where:"suite","isosurface" | sort: "order" %}
14+
{% include auto_examples.html examples=examples %}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: Isosurface with Additional Slices
3+
plot_url: https://codepen.io/plotly/embed/yrpppj/?height=542&theme-id=15263&default-tab=result
4+
language: plotly_js
5+
suite: isosurface
6+
order: 3
7+
sitemap: false
8+
arrangement: horizontal
9+
---
10+
11+
Plotly.d3.csv('https://raw.githubusercontent.com/plotly/datasets/master/clebsch-cubic.csv', function(err, rows){
12+
function unpack(rows, key) {
13+
return rows.map(function(row) {return parseFloat(row[key]); });
14+
}
15+
16+
var data = [
17+
{
18+
type: "isosurface",
19+
x: unpack(rows, 'x'),
20+
y: unpack(rows, 'y'),
21+
z: unpack(rows, 'z'),
22+
value: unpack(rows, 'value'),
23+
isomin: -100,
24+
isomax: 100,
25+
surface: {show: true, count: 1, fill: 0.8},
26+
slices: {z: {
27+
show: true, locations: [-0.3, 0.5]
28+
}},
29+
caps: {
30+
x: {show: false},
31+
y: {show: false},
32+
z: {show: false}
33+
},
34+
}
35+
];
36+
37+
var layout = {
38+
margin: {t:0, l:0, b:0},
39+
scene: {
40+
camera: {
41+
eye: {
42+
x: 1.86,
43+
y: 0.61,
44+
z: 0.98
45+
}
46+
}
47+
}
48+
};
49+
50+
Plotly.newPlot(graphDiv, data, layout, {showSendToCloud: true});
51+
});
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: Multiple Isosurfaces with Caps
3+
plot_url: https://codepen.io/plotly/embed/ZZvvPV/?height=542&theme-id=15263&default-tab=result
4+
language: plotly_js
5+
suite: isosurface
6+
order: 4
7+
sitemap: false
8+
arrangement: horizontal
9+
---
10+
11+
Plotly.d3.csv('https://raw.githubusercontent.com/plotly/datasets/master/clebsch-cubic.csv', function(err, rows){
12+
function unpack(rows, key) {
13+
return rows.map(function(row) {return parseFloat(row[key]); });
14+
}
15+
16+
var data = [
17+
{
18+
type: "isosurface",
19+
x: unpack(rows, 'x'),
20+
y: unpack(rows, 'y'),
21+
z: unpack(rows, 'z'),
22+
value: unpack(rows, 'value'),
23+
isomin: -10,
24+
isomax: 10,
25+
surface: {show: true, count: 4, fill: 1, pattern: 'odd'},
26+
caps: {
27+
x: {show: true},
28+
y: {show: true},
29+
z: {show: true}
30+
},
31+
}
32+
];
33+
34+
var layout = {
35+
margin: {t:0, l:0, b:0},
36+
scene: {
37+
camera: {
38+
eye: {
39+
x: 1.86,
40+
y: 0.61,
41+
z: 0.98
42+
}
43+
}
44+
}
45+
};
46+
47+
Plotly.newPlot(graphDiv, data, layout, {showSendToCloud: true});
48+
});
49+

0 commit comments

Comments
 (0)