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

add documentation for the 'plot/errorbars' and 'plot/rectangles' elements

parent 377c5412
Loading
Loading
Loading
Loading
+105 −0
Original line number Diff line number Diff line
name: plot/errorbars
example: charts-scientific/errorbars_log
desc: |
  The `plot/errorbars` element is used to draw error bars.

reference: |
  (plot/errorbars <options>)

option_summary: true

properties:
  - title: "Error Bar Options"
    anchor: errorbar-options
    properties:
      - name: data-x
        desc: |
          Set the 'x' dataset for the plot. The 'x' dataset will be used to
          calculate the horizontal position of geometry.
        desc_code: |
          data-x (<values>...)
          data-x (csv <file> <column>)
        examples: |
          ;; list of static values
          data-x (10px 20px 30px)

          ;; load a csv file
          data-x (csv myfile.csv mycolumn)
      - name: data-x-high
        alias: data-x
      - name: data-x-low
        desc: |
          Set the 'x2' dataset for the plot. The 'x2' dataset will be used to
          calculate the horizontal position of geometry.
        desc_code: |
          data-x-low (<values>...)
          data-x-low (csv <file> <column>)
        examples: |
          ;; list of static values
          data-x-low (10px 20px 30px)

          ;; load a csv file
          data-x-low (csv myfile.csv mycolumn)
      - name: data-y
        desc: |
          Set the 'y' dataset for the plot. The 'y' dataset will be used to
          calculate the vertical position of geometry.
        desc_code: |
          data-y (<values>...)
          data-y (csv <file> <column>)
        examples: |
          ;; list of static values
          data-y (10px 20px 30px)

          ;; load a csv file
          data-y (csv myfile.csv mycolumn)
      - name: data-y-high
        alias: data-y
      - name: data-y-low
        desc: |
          Set the 'y2' dataset for the plot. The 'y2' dataset will be used to
          calculate the vertical position of geometry.
        desc_code: |
          data-y-low (<values>...)
          data-y-low (csv <file> <column>)
        examples: |
          ;; list of static values
          data-y-low (10px 20px 30px)

          ;; load a csv file
          data-y-low (csv myfile.csv mycolumn)
      - name: color
        desc: |
          Set the bar color.
        desc_code: |
          color <color>
      - name: errorbar-width
        desc: |
          Set the error bar width. See the
          [measure](#FIXME) page for more details on valid values.
        desc_code: |
          bar-width <measure>
        examples: |
          ;; set the bar width to 1em
          bar-width 1em
      - name: stroke-color
        desc: |
          Set the errorbar's stroke color. See the [color](#FIXME) page for more details on valid values.
        desc_code: |
          bar-stroke-color <color>
        examples: |
          ;; set the stroke color to grey
          bar-stroke-color #eee
      - name: stroke-width
        desc: |
          Set the errorbar's stroke width. See the
          [measure](#FIXME) page for more details on valid values.
        desc_code: |
          bar-stroke-width <measure>
        examples: |
          ;; set the bar stroke width to 2pt
          bar-stroke-width 2pt

  - title: "Scale Options"
    anchor: scale-options
    inherit: ["elements/plot", "scale-options"]
+133 −0
Original line number Diff line number Diff line
name: plot/rectangles
example: charts-scientific/scalarfield
desc: |
  The `plot/recatangles` element is used to create tiled plots.

reference: |
  (plot/rectangles <options>)

option_summary: true

properties:
  - title: "Rectangle Options"
    anchor: rectangle-options
    properties:
      - name: data-x
        desc: |
          Set the 'x' dataset for the plot. The 'x' dataset will be used to
          calculate the horizontal position of the rectangles.
        desc_code: |
          data-x (<values>...)
          data-x (csv <file> <column>)
        examples: |
          ;; list of static values
          data-x (10px 20px 30px)

          ;; load a csv file
          data-x (csv myfile.csv mycolumn)
      - name: data-y
        desc: |
          Set the 'y' dataset for the plot. The 'y' dataset will be used to
          calculate the vertical position of the rectangles.
        desc_code: |
          data-y (<values>...)
          data-y (csv <file> <column>)
        examples: |
          ;; list of static values
          data-y (10px 20px 30px)

          ;; load a csv file
          data-y (csv myfile.csv mycolumn)
      - name: data-color
        desc: |
          Set the 'color' dataset for the plot. The 'color' dataset will be used to
          calculate the color of rectangles. The mapping of input values to colors
          is controlled by the `color-map` option. If no explicit `color-map`
          option is provided, the values `data-color` will be interpreted as
          hex color codes.
        desc_code: |
          data-color (<values>...)
          data-color (csv <file> <column>)
        examples: |
          ;; list of static values
          data-color (#06c #c06 #06c)

          ;; load a csv file
          data-color (csv myfile.csv mycolors)
      - name: data-size
        desc: |
          Load the rectangle sizes from data.
        desc_code: |
          data-size (<values>...)
          data-size (csv <file> <column>)
        examples: |
          ;; list of static values
          data-size (2pt 8pt 5pt)

          ;; load a csv file
          data-size (csv myfile.csv mysizes)
      - name: data-size-x
        desc: Load the rectangle widths from data
        desc_code: |
          data-size-x (<values>...)
          data-size-x (csv <file> <column>)
        examples: |
          ;; list of static values
          data-size-x (2pt 8pt 5pt)

          ;; load a csv file
          data-size-x (csv myfile.csv mysizes)
      - name: data-size-y
        desc: Load the rectangle heights from data
        desc_code: |
          data-size-y (<values>...)
          data-size-y (csv <file> <column>)
        examples: |
          ;; list of static values
          data-size-y (2pt 8pt 5pt)

          ;; load a csv file
          data-size-y (csv myfile.csv mysizes)
      - name: color
        desc: |
          Set the point color. Note that this value is only used if no data-colors
          option is specified.
        desc_code: |
          color <color>
      - name: color-map
        desc: |
          Set the point color map. If no map is specified, the values in `data-color`
          will be interpreted as hex color values.
        desc_code: |
          color-map <color-map>
      - name: size
        desc: |
          Set rectangle size in both dimensions (x and y). Note that
          this value is only used if no data-size option is specified.
        desc_code: |
          size <measure>
        examples: |
          ;; set the rectangle size to 5pt
          size 5pt
      - name: size-x
        desc: |
          Set rectangle size in the x dimension. Note that
          this value is only used if no data-size option is specified.
        desc_code: |
          size <measure>
        examples: |
          ;; set the rectangle width to 5pt
          size-x 5pt
      - name: size-y
        desc: |
          Set rectangle size in the y dimension. Note that
          this value is only used if no data-size option is specified.
        desc_code: |
          size <measure>
        examples: |
          ;; set the rectangle height to 5pt
          size-u 5pt

  - title: "Scale Options"
    anchor: scale-options
    inherit: ["elements/plot", "scale-options"]
+2 −1
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ Element | Description
[`plot/lines`](elements/plot/lines) | The plot/lines element is used to create line charts.
[`plot/points`](elements/plot/points) | The plot/points element is used to create scatterplots.
[`plot/vectors`](elements/plot/vectors) | The plot/vectors element is used to create vector "field" plots.
[`plot/rectangles`](elements/plot/rectangles) | The plot/rectangles element is used to create tiled plots.
[`legend`](elements/legend) | The legend element is a container object for legends.
[`legend/item`](elements/legend/item) | The legend/item element is used to draw a legend item.
[`layout/box`](elements/layout/box) | The layout/box element is the basic box layout element.