|
| 1 | +--- |
| 2 | +name: Simple Ternary Contour Plot |
| 3 | +plot_url: https://plot.ly/~tarzzz/2234 |
| 4 | +arrangement: horizontal |
| 5 | +language: matlab |
| 6 | +suite: ternary-plots |
| 7 | +order: 0 |
| 8 | +sitemap: false |
| 9 | +--- |
| 10 | + |
| 11 | +trace1 = struct(... |
| 12 | + 'a', [0, 15, 20, 20, 5, 5, 0], ... |
| 13 | + 'b', [70, 85, 80, 53, 53, 45, 50], ... |
| 14 | + 'c', [30, 0, 0, 32, 42, 50, 50], ... |
| 15 | + 'fill', 'toself', ... |
| 16 | + 'fillcolor', '#8dd3c7', ... |
| 17 | + 'line', struct('color', '#444'), ... |
| 18 | + 'mode', 'lines', ... |
| 19 | + 'text', 'sandy loam', ... |
| 20 | + 'type', 'scatterternary', ... |
| 21 | + 'uid', 'a1a8b8'); |
| 22 | +trace2 = struct(... |
| 23 | + 'a', [20, 35, 35, 28, 20], ... |
| 24 | + 'b', [80, 65, 45, 45, 53], ... |
| 25 | + 'c', [0, 0, 20, 27, 32], ... |
| 26 | + 'fill', 'toself', ... |
| 27 | + 'fillcolor', '#ffffb3', ... |
| 28 | + 'line', struct('color', '#444'), ... |
| 29 | + 'mode', 'lines', ... |
| 30 | + 'text', 'sandy clay loam', ... |
| 31 | + 'type', 'scatterternary', ... |
| 32 | + 'uid', 'c72344'); |
| 33 | +trace3 = struct(... |
| 34 | + 'a', [40, 40, 28, 28], ... |
| 35 | + 'b', [45, 20, 20, 45], ... |
| 36 | + 'c', [15, 40, 52, 27], ... |
| 37 | + 'fill', 'toself', ... |
| 38 | + 'fillcolor', '#bebada', ... |
| 39 | + 'line', struct('color', '#444'), ... |
| 40 | + 'mode', 'lines', ... |
| 41 | + 'text', 'clay loam', ... |
| 42 | + 'type', 'scatterternary', ... |
| 43 | + 'uid', '3eab74'); |
| 44 | +trace4 = struct(... |
| 45 | + 'a', [0, 10, 15, 0], ... |
| 46 | + 'b', [90, 90, 85, 70], ... |
| 47 | + 'c', [10, 0, 0, 30], ... |
| 48 | + 'fill', 'toself', ... |
| 49 | + 'fillcolor', '#fb8072', ... |
| 50 | + 'line', struct('color', '#444'), ... |
| 51 | + 'mode', 'lines', ... |
| 52 | + 'text', 'loamy sand', ... |
| 53 | + 'type', 'scatterternary', ... |
| 54 | + 'uid', 'b9dc9f'); |
| 55 | +trace5 = struct(... |
| 56 | + 'a', [35, 35, 55], ... |
| 57 | + 'b', [65, 45, 45], ... |
| 58 | + 'c', [0, 20, 0], ... |
| 59 | + 'fill', 'toself', ... |
| 60 | + 'fillcolor', '#80b1d3', ... |
| 61 | + 'line', struct('color', '#444'), ... |
| 62 | + 'mode', 'lines', ... |
| 63 | + 'text', 'sandy clay', ... |
| 64 | + 'type', 'scatterternary', ... |
| 65 | + 'uid', '381ad2'); |
| 66 | +trace6 = struct(... |
| 67 | + 'a', [60, 40, 40], ... |
| 68 | + 'b', [0, 0, 20], ... |
| 69 | + 'c', [40, 60, 40], ... |
| 70 | + 'fill', 'toself', ... |
| 71 | + 'fillcolor', '#fdb462', ... |
| 72 | + 'line', struct('color', '#444'), ... |
| 73 | + 'mode', 'lines', ... |
| 74 | + 'text', 'silty clay', ... |
| 75 | + 'type', 'scatterternary', ... |
| 76 | + 'uid', '8cc163'); |
| 77 | +trace7 = struct(... |
| 78 | + 'a', [0, 28, 28, 12, 12, 0], ... |
| 79 | + 'b', [50, 22, 0, 0, 8, 20], ... |
| 80 | + 'c', [50, 50, 72, 88, 80, 80], ... |
| 81 | + 'fill', 'toself', ... |
| 82 | + 'fillcolor', '#b3de69', ... |
| 83 | + 'line', struct('color', '#444'), ... |
| 84 | + 'mode', 'lines', ... |
| 85 | + 'text', 'silty loam', ... |
| 86 | + 'type', 'scatterternary', ... |
| 87 | + 'uid', '6f33dc'); |
| 88 | +trace8 = struct(... |
| 89 | + 'a', [0, 10, 0], ... |
| 90 | + 'b', [100, 90, 90], ... |
| 91 | + 'c', [0, 0, 10], ... |
| 92 | + 'fill', 'toself', ... |
| 93 | + 'fillcolor', '#fccde5', ... |
| 94 | + 'line', struct('color', '#444'), ... |
| 95 | + 'mode', 'lines', ... |
| 96 | + 'text', 'sand', ... |
| 97 | + 'type', 'scatterternary', ... |
| 98 | + 'uid', 'cf9e4b'); |
| 99 | +trace9 = struct(... |
| 100 | + 'a', [28, 28, 40, 40], ... |
| 101 | + 'b', [0, 20, 20, 0], ... |
| 102 | + 'c', [72, 52, 40, 60], ... |
| 103 | + 'fill', 'toself', ... |
| 104 | + 'fillcolor', '#d9d9d9', ... |
| 105 | + 'line', struct('color', '#444'), ... |
| 106 | + 'mode', 'lines', ... |
| 107 | + 'text', 'silty clay loam', ... |
| 108 | + 'type', 'scatterternary', ... |
| 109 | + 'uid', 'cb4ee4'); |
| 110 | +trace10 = struct(... |
| 111 | + 'a', [55, 100, 60, 40, 40], ... |
| 112 | + 'b', [45, 0, 0, 20, 45], ... |
| 113 | + 'c', [0, 0, 40, 40, 15], ... |
| 114 | + 'fill', 'toself', ... |
| 115 | + 'fillcolor', '#bc80bd', ... |
| 116 | + 'line', struct('color', '#444'), ... |
| 117 | + 'mode', 'lines', ... |
| 118 | + 'text', 'clay', ... |
| 119 | + 'type', 'scatterternary', ... |
| 120 | + 'uid', '05c24e'); |
| 121 | +trace11 = struct(... |
| 122 | + 'a', [0, 0, 12, 12], ... |
| 123 | + 'b', [0, 20, 8, 0], ... |
| 124 | + 'c', [100, 80, 80, 88], ... |
| 125 | + 'fill', 'toself', ... |
| 126 | + 'fillcolor', '#ccebc5', ... |
| 127 | + 'line', struct('color', '#444'), ... |
| 128 | + 'mode', 'lines', ... |
| 129 | + 'text', 'silt', ... |
| 130 | + 'type', 'scatterternary', ... |
| 131 | + 'uid', 'bdc504'); |
| 132 | +trace12 = struct(... |
| 133 | + 'a', [28, 28, 5, 5, 20], ... |
| 134 | + 'b', [45, 22, 45, 53, 53], ... |
| 135 | + 'c', [27, 50, 50, 42, 32], ... |
| 136 | + 'fill', 'toself', ... |
| 137 | + 'fillcolor', '#ffed6f', ... |
| 138 | + 'line', struct('color', '#444'), ... |
| 139 | + 'mode', 'lines', ... |
| 140 | + 'text', 'loam', ... |
| 141 | + 'type', 'scatterternary', ... |
| 142 | + 'uid', 'ef23fc'); |
| 143 | +data = {trace1, trace2, trace3, trace4, trace5, trace6, trace7, trace8, trace9, trace10, trace11, trace12}; |
| 144 | +layout = struct(... |
| 145 | + 'autosize', true, ... |
| 146 | + 'height', 545, ... |
| 147 | + 'showlegend', false, ... |
| 148 | + 'ternary', struct(... |
| 149 | + 'aaxis', struct(... |
| 150 | + 'linewidth', 2, ... |
| 151 | + 'min', 0.01, ... |
| 152 | + 'ticks', 'outside', ... |
| 153 | + 'ticksuffix', '%', ... |
| 154 | + 'title', 'clay'), ... |
| 155 | + 'baxis', struct(... |
| 156 | + 'linewidth', 2, ... |
| 157 | + 'min', 0.01, ... |
| 158 | + 'ticks', 'outside', ... |
| 159 | + 'ticksuffix', '%', ... |
| 160 | + 'title', 'sand'), ... |
| 161 | + 'caxis', struct(... |
| 162 | + 'linewidth', 2, ... |
| 163 | + 'min', 0.01, ... |
| 164 | + 'ticks', 'outside', ... |
| 165 | + 'ticksuffix', '%', ... |
| 166 | + 'title', 'silt'), ... |
| 167 | + 'sum', 100), ... |
| 168 | + 'title', 'Simple Ternary Contour Plot with Python', ... |
| 169 | + 'width', 1044); |
| 170 | +response = plotly(data, struct('layout', layout)); |
| 171 | +plot_url = response.url |
0 commit comments