Commit 2a5426df authored by Paul Asmuth's avatar Paul Asmuth
Browse files

update the 'streamgraph' example

parent 70c58ee8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -124,6 +124,10 @@ source code that generated it. Even more examples can be found on the
#### Example: [`examples/charts-scientific/scatterplot_colors`](https://fviz.org/examples/charts-scientific/scatterplot_colors)
[![scatterplot_colors.svg](/examples/charts-scientific/scatterplot_colors.svg)](https://fviz.org/examples/charts-scientific/scatterplot_colors)

---
#### Example: [`examples/charts-scientific/streamgraph`](https://fviz.org/examples/charts-scientific/streamgraph)
[![streamgraph.svg](/examples/charts-scientific/streamgraph.svg)](https://fviz.org/examples/charts-scientific/streamgraph)


### Examples: Editorial Charts

+1 −1
Original line number Diff line number Diff line
<svg xmlns="http://www.w3.org/2000/svg" width="1200.000000" height="480.000000" viewBox="0 0 1200 480">
  <rect width="1200.000000" height="480.000000" fill="#ffffffff"/>
  <path fill="#ccccccff" d="M14.6667 106.992 L161 91.344 L307.333 71.784 L600 110.904 L892.667 157.848 L1185.33 110.904 L1185.33 365.184 L892.667 310.416 L600 333.888 L307.333 318.24 L161 357.36 L14.6667 373.008 Z"/>
  <path fill="#888888ff" d="M14.6667 118.728 L161 110.904 L307.333 91.344 L600 134.376 L892.667 189.144 L1185.33 122.64 L1185.33 310.416 L892.667 267.384 L600 318.24 L307.333 298.68 L161 318.24 L14.6667 333.888 Z"/>
  <path fill="#888888ff" d="M14.6667 118.728 L161 110.904 L307.333 122.64 L600 134.376 L892.667 189.144 L1185.33 122.64 L1185.33 310.416 L892.667 267.384 L600 318.24 L307.333 279.12 L161 318.24 L14.6667 333.888 Z"/>
  <path stroke-width="2.000000" stroke="#000000ff" fill="none" d="M14.6667 235.188 L307.333 199.628 L600 264.372 L892.667 222.67 L1185.33 226.504 "/>
  <path fill="#000000ff" d="M16.6667 235.188 M12.6667 235.188 a2 2 0 1 0 4 0 a2 2 0 1 0 -4 0 "/>
  <path fill="#000000ff" d="M309.333 199.628 M305.333 199.628 a2 2 0 1 0 4 0 a2 2 0 1 0 -4 0 "/>
+0 −56
Original line number Diff line number Diff line
<svg xmlns="http://www.w3.org/2000/svg" width="960.000000" height="200.000000" viewBox="0 0 960 200">
  <rect width="960.000000" height="200.000000" fill="#ffffffff"/>
  <path fill="#aa4643ff" d="M59.8375 37.216 L170.524 31.5787 L281.211 24.532 L502.585 38.6253 L723.959 55.5373 L945.333 38.6253 L945.333 130.232 L723.959 110.501 L502.585 118.957 L281.211 113.32 L170.524 127.413 L59.8375 133.051 Z"/>
  <path fill="#db843dff" d="M59.8375 41.444 L170.524 38.6253 L281.211 31.5787 L502.585 47.0813 L723.959 66.812 L945.333 42.8533 L945.333 110.501 L723.959 94.9987 L502.585 113.32 L281.211 106.273 L170.524 113.32 L59.8375 118.957 Z"/>
  <path fill="#ffffffff" d="M782.44 14.6667 L945.333 14.6667 L945.333 32.6667 L782.44 32.6667 Z"/>
  <text x="798.572917" y="28.666667" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">Series A</text>
  <path fill="#aa4643ff" d="M790.14 23.6667 M779.14 23.6667 a5.5 5.5 0 1 0 11 0 a5.5 5.5 0 1 0 -11 0 "/>
  <text x="889.880208" y="28.666667" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">Series B</text>
  <path fill="#db843dff" d="M881.447 23.6667 M870.447 23.6667 a5.5 5.5 0 1 0 11 0 a5.5 5.5 0 1 0 -11 0 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M59.8375 155.6 L945.333 155.6 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M59.8375 150.267 L59.8375 155.6 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M148.387 150.267 L148.387 155.6 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M236.937 150.267 L236.937 155.6 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M325.486 150.267 L325.486 155.6 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M414.036 150.267 L414.036 155.6 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M502.585 150.267 L502.585 155.6 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M591.135 150.267 L591.135 155.6 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M679.685 150.267 L679.685 155.6 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M768.234 150.267 L768.234 155.6 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M856.784 150.267 L856.784 155.6 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M945.333 150.267 L945.333 155.6 "/>
  <text x="45.564063" y="181.333333" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">10.0</text>
  <text x="134.113647" y="181.333333" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">14.0</text>
  <text x="222.663232" y="181.333333" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">18.0</text>
  <text x="311.212823" y="181.333333" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">22.0</text>
  <text x="399.762401" y="181.333333" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">26.0</text>
  <text x="488.311979" y="181.333333" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">30.0</text>
  <text x="576.861584" y="181.333333" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">34.0</text>
  <text x="665.411135" y="181.333333" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">38.0</text>
  <text x="753.960740" y="181.333333" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">42.0</text>
  <text x="842.510344" y="181.333333" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">46.0</text>
  <text x="931.059896" y="181.333333" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">50.0</text>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M59.8375 14.6667 L59.8375 155.6 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M59.8375 155.6 L65.1708 155.6 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M59.8375 141.507 L65.1708 141.507 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M59.8375 127.413 L65.1708 127.413 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M59.8375 113.32 L65.1708 113.32 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M59.8375 99.2267 L65.1708 99.2267 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M59.8375 85.1333 L65.1708 85.1333 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M59.8375 71.04 L65.1708 71.04 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M59.8375 56.9467 L65.1708 56.9467 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M59.8375 42.8533 L65.1708 42.8533 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M59.8375 28.76 L65.1708 28.76 "/>
  <path stroke-width="1.333333" stroke="#000000ff" fill="none" d="M59.8375 14.6667 L65.1708 14.6667 "/>
  <text x="14.666667" y="160.600000" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">-50.0</text>
  <text x="14.666667" y="146.506666" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">-40.0</text>
  <text x="14.666667" y="132.413333" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">-30.0</text>
  <text x="14.666667" y="118.319998" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">-20.0</text>
  <text x="14.666667" y="104.226666" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">-10.0</text>
  <text x="27.713542" y="90.133333" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">0.0</text>
  <text x="19.557292" y="76.039997" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">10.0</text>
  <text x="19.557292" y="61.946668" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">20.0</text>
  <text x="19.557292" y="47.853332" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">30.0</text>
  <text x="19.557292" y="33.759995" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">40.0</text>
  <text x="19.557292" y="19.666667" fill="#000000ff" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">50.0</text>
</svg>
 No newline at end of file
+19 −0
Original line number Diff line number Diff line
(set height 200px)
(set width 960px)
(set width 2000px)
(set height 600px)
(set dpi 200)
(set font "Latin Modern Roman")

(plot
    axes (bottom left)
    limit-y (-50 50)
    limit-y (-80 80)
    areas (
        data-x (csv "tests/testdata/areadata2.csv" x)
        data-y (csv "tests/testdata/areadata2.csv" z)
        data-y-low (csv "tests/testdata/areadata2.csv" y)
        color 2)
        stroke-width 1pt
        fill (hatch angle 65 width .8pt stride 3.5pt))
    areas (
        data-x (csv "tests/testdata/areadata2.csv" x)
        data-y (csv "tests/testdata/areadata2.csv" z2)
        data-y-low (csv "tests/testdata/areadata2.csv" y2)
        color 3)
    legend-overlay (
        position (top right)
        background #fff
        border none
        margin 0
        padding 0
        item-column-padding 1.4em
        item-flow on
        item (label "Series A" color 2)
        item (label "Series B" color 3)))
        stroke-width 1pt
        fill #eee))
+241 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading