Commit f85a0ef8 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

update examples and tests

parent 5142e376
Loading
Loading
Loading
Loading
+15 −14
Original line number Diff line number Diff line
(limit-y (0 20000000))
(limit-x (1404278100 1404299700))
(layer/resize 1024px 512px)
(layer/set-dpi 96)

(axes
(tools/plotgen
    limit-y (0 20000000)
    limit-x (1404278100 1404299700)
    axes (
        position (bottom left)
        label-format-y (scientific)
        label-format-x (datetime "%H:%M:%S"))

(grid
    grid (
        color #fff)

(areas
    areas (
        data-x (csv "test/testdata/measurement.csv" time)
        data-y (csv "test/testdata/measurement.csv" value1)
    color #888)
        color #888))
+26 −30
Original line number Diff line number Diff line
(height 480px)
(width 1200px)
(layer/resize 1200px 480px)
(layer/set-dpi 96)

(limit-y (-50 50))

(axes
(tools/plotgen
    limit-y (-50 50)
    axes (
        position (bottom top))

(areas
    areas (
        data-x (csv "test/testdata/areadata2.csv" x)
        data-y (csv "test/testdata/areadata2.csv" z)
        data-y-low (csv "test/testdata/areadata2.csv" y)
        color #ccc)

(areas
    areas (
        data-x (csv "test/testdata/areadata2.csv" x)
        data-y (csv "test/testdata/areadata2.csv" z2)
        data-y-low (csv "test/testdata/areadata2.csv" y2)
        color #888)

(lines
    lines (
        data-x (10 20 30 40 50)
        data-y (1.23 10.32 -6.23 4.43 3.45)
        marker-size 4pt)

(legend
    legend (
        position (bottom right)
        item-flow on
        item (label "Series A" color #ccc)
        item (label "Series B" color #888)
    item (label "Combined" color #000))
        item (label "Combined" color #000)))
+13 −14
Original line number Diff line number Diff line
(height 480px)
(width 1200px)
(layer/resize 1200px 480px)
(layer/set-dpi 96)

(limit-x (0 150))
(limit-y (1404278100 1404299700))

(axes
(tools/plotgen
    limit-x (0 150)
    limit-y (1404278100 1404299700)
    axes (
        position (left bottom)
        label-format-y (datetime "%H:%M:%S"))

(areas
    areas (
        data-x (csv "test/testdata/measurement.csv" value2)
        data-y (csv "test/testdata/measurement.csv" time)
        direction horizontal
    color #999)
        color #999))
+23 −27
Original line number Diff line number Diff line
(width 2048px)
(height 512px)
(dpi 240)
(layer/resize 2048px 512px)
(layer/set-dpi 240)

(scale-x (categorical (A B C D E F)))
(limit-y (0 80))

(axes
(tools/plotgen
    scale-x (categorical (A B C D E F))
    limit-y (0 80)
    axes (
        label-placement-y (linear-interval 10 10 70))

(grid
    color (rgba 0 0 0 .05)
    grid (
        color (rgba 0 0 0 0.05)
        stroke-style (dashed)
        tick-placement-x (none))

(bars
    bars (
        data-x (csv "test/testdata/bardata.csv" var3)
        data-y (csv "test/testdata/bardata.csv" var1)
        width (1em)
        offset (-.8em)
        color #444)

(bars
    bars (
        data-x (csv "test/testdata/bardata.csv" var3)
        data-y (csv "test/testdata/bardata.csv" var2)
        width (1em)
        offset (.8em)
    color #999)
        color #999))
+17 −20
Original line number Diff line number Diff line
(width 2048px)
(height 512px)
(dpi 180)
(layer/resize 2048px 512px)
(layer/set-dpi 180)

(limit-x (1404278100 1404299700))
(limit-y (6000000 10000000))

(axes
(tools/plotgen
    limit-x (1404278100 1404299700)
    limit-y (6000000 10000000)
    axes (
        position (bottom left)
        label-format-y (scientific)
        label-format-x (datetime "%H:%M:%S")
        label-placement-x (linear-align 1800))

(lines
    lines (
        data-x (csv "test/testdata/measurement.csv" time)
        data-y (csv "test/testdata/measurement.csv" value1)
        color #06c)

(legend
    legend (
        position (top right)
    item (label "Random Data" color #06c))
        item (label "Random Data" color #06c)))
Loading