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

Skip to content

Commit d17ddfb

Browse files
committed
Merge branch 'source-design-merge' of https://github.com/plotly/documentation into source-design-merge
2 parents 84cad92 + 3de5f12 commit d17ddfb

File tree

5 files changed

+736
-1
lines changed

5 files changed

+736
-1
lines changed

_config_dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ plotlyjs_download_url: https://cdn.plot.ly/plotly-latest.min.js
1717
# Excludes
1818
# ---
1919
# all of the posts: ['*.Rmd','_posts/2015-09-09-matlab-reference.html','_posts/2015-09-06-r-reference.html','_posts/2015-09-06-python-reference.html','_posts/2015-08-19-plotly_js-reference.html','_posts/2015-04-05-ggplot2-index.html','_posts/2015-04-05-julia-index.html','_posts/2015-04-05-matlab-index.html','_posts/2015-04-05-matplotlib-index.html','_posts/2015-04-05-node_js-index.html','_posts/2015-04-05-plotly_js-index.html','_posts/2015-04-05-plotlyjs-function-reference.md','_posts/2015-04-05-python-index.html','_posts/2015-05-25-ipython-notebooks_gallery.html','_posts/2015-05-25-ipython-notebooks_index.html','_posts/2015-07-13-eula_index.html','_posts/2015-07-19-pandas.html','_posts/2015-07-26-index.html','_posts/2015-07-30-r-index.Rmd','_posts/2015-07-30-r-index.md','_posts/2015-08-20-research-box-index.html','_posts/ggplot2','_posts/julia','_posts/matlab','_posts/matplotlib','_posts/nodejs','_posts/pandas','_posts/plotly_js','_posts/python','_posts/r','_posts/tutorials','_posts/user_guide_matlab','_posts/user_guide_python']
20-
exclude: ['*.Rmd','_posts/2015-09-09-matlab-reference.html','_posts/2015-09-06-r-reference.html','_posts/2015-09-06-python-reference.html','_posts/2015-08-19-plotly_js-reference.html','_posts/2015-04-05-ggplot2-index.html','_posts/2015-04-05-julia-index.html','_posts/2015-04-05-matlab-index.html','_posts/2015-04-05-matplotlib-index.html','_posts/2015-04-05-node_js-index.html','_posts/2015-04-05-plotlyjs-function-reference.md','_posts/2015-04-05-python-index.html','_posts/2015-05-25-ipython-notebooks_gallery.html','_posts/2015-05-25-ipython-notebooks_index.html','_posts/2015-07-13-eula_index.html','_posts/2015-07-19-pandas.html','_posts/2015-07-26-index.html','_posts/2015-07-30-r-index.Rmd','_posts/2015-07-30-r-index.md','_posts/2015-08-20-research-box-index.html','_posts/ggplot2','_posts/julia','_posts/matlab','_posts/matplotlib','_posts/nodejs','_posts/pandas','_posts/python','_posts/r','_posts/tutorials','_posts/user_guide_matlab','_posts/user_guide_python']
20+
exclude: ['*.Rmd','_posts/2015-09-09-matlab-reference.html','_posts/2015-09-06-r-reference.html','_posts/2015-09-06-python-reference.html','_posts/2015-08-19-plotly_js-reference.html','_posts/2015-04-05-ggplot2-index.html','_posts/2015-04-05-julia-index.html','_posts/2015-04-05-matlab-index.html','_posts/2015-04-05-matplotlib-index.html','_posts/2015-04-05-node_js-index.html','_posts/2015-04-05-plotlyjs-function-reference.md','_posts/2015-04-05-python-index.html','_posts/2015-05-25-ipython-notebooks_gallery.html','_posts/2015-05-25-ipython-notebooks_index.html','_posts/2015-07-13-eula_index.html','_posts/2015-07-19-pandas.html','_posts/2015-07-26-index.html','_posts/2015-07-30-r-index.Rmd','_posts/2015-07-30-r-index.md','_posts/2015-08-20-research-box-index.html','_posts/ggplot2','_posts/julia','_posts/matlab','_posts/matplotlib','_posts/nodejs','_posts/pandas','_posts/python','_posts/r','_posts/tutorials','_posts/user_guide_matlab','_posts/user_guide_python']
2121
#exclude: [_posts/temp, '*.Rmd']
2222

2323
# ---
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
name: soil types ternary fill plot
3+
plot_url: https://codepen.io/plotly/embed/VaGrRB/?height=500&theme-id=15263&default-tab=result
4+
language: plotly_js
5+
suite: ternary-contour
6+
order: 1
7+
sitemap: false
8+
arrangement: horizontal
9+
description: Inspired from Daven Quinn's <a href="http://bl.ocks.org/davenquinn/988167471993bc2ece29">block</a>
10+
---
11+
var url = 'https://gist.githubusercontent.com/davenquinn/988167471993bc2ece29/raw/f38d9cb3dd86e315e237fde5d65e185c39c931c2/data.json';
12+
13+
var colors = ['#8dd3c7','#ffffb3','#bebada','#fb8072','#80b1d3','#fdb462','#b3de69','#fccde5','#d9d9d9','#bc80bd','#ccebc5','#ffed6f'];
14+
15+
16+
Plotly.d3.json(url, function(err, rawData) {
17+
if(err) throw err;
18+
19+
plot(rawData);
20+
});
21+
22+
function plot(rawData) {
23+
var data = Object.keys(rawData).map(function(k, i) {
24+
var pts = rawData[k];
25+
pts = pts.concat(pts[0]);
26+
27+
return {
28+
type: 'scatterternary',
29+
mode: 'lines',
30+
name: k,
31+
a: pts.map(function(d) { return d.clay }),
32+
b: pts.map(function(d) { return d.sand }),
33+
c: pts.map(function(d) { return d.silt }),
34+
line: { color: '#444' },
35+
fill: 'toself',
36+
fillcolor: colors[i]
37+
};
38+
});
39+
40+
var layout = {
41+
ternary: {
42+
sum: 100,
43+
aaxis: makeAxis('Clay'),
44+
baxis: makeAxis('Sand'),
45+
caxis: makeAxis('Silt')
46+
},
47+
showlegend: false,
48+
width: 700,
49+
annotations: [{
50+
showarrow: false,
51+
text: 'Soil Types Fill Plot',
52+
x: 0.15,
53+
y: 1.1
54+
}]
55+
};
56+
57+
Plotly.plot('graph', data, layout);
58+
}
59+
60+
function makeAxis(title) {
61+
return {
62+
title: title,
63+
ticksuffix: '%',
64+
min: 0.01,
65+
linewidth: 2,
66+
ticks: 'outside',
67+
ticklen: 8,
68+
showgrid: true,
69+
};
70+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: Javascript Graphing Library D3.js-based Ternary Contour Plots | Examples | Plotly
3+
name: Ternary Contour Plots
4+
permalink: javascript/ternary-contour/
5+
description: How to create D3.js-based ternary contour plots. Examples of Ternary Contour Plots with plotly.
6+
layout: base
7+
thumbnail: thumbnail/ternary-contour.jpg
8+
language: plotly_js
9+
page_type: example_index
10+
has_thumbnail: true
11+
display_as: basic
12+
order: 1
13+
---
14+
{% assign examples = site.posts | where:"language","plotly_js" | where:"suite","ternary-contour" | sort: "order" %}
15+
{% include auto_examples.html examples=examples %}

_posts/python/ternary-contour/2015-06-30-ternary-contour.html

Lines changed: 311 additions & 0 deletions
Large diffs are not rendered by default.

_posts/python/ternary-contour/ternary-contour.ipynb

Lines changed: 339 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)