Figure

  • Representation of a Plotly chart.

    Plotly‘s graphs are built from two main types of building blocks - traces and layout. Trace describes a single series of data visible in a graph. Traces can be constructed from a wide variety of predefined types, e.g. scatter, heatmap, bar or polar. Layout applies to the entire chart and affect properties like the title, axis annotations and many more.

    See more

    Declaration

    Swift

    public struct Figure
    extension Figure: CustomPlaygroundDisplayConvertible
    extension Figure: Encodable
  • Data series that for displaying in a Plotly chart.

    See more

    Declaration

    Swift

    public protocol Trace : Encodable
  • Set of choices that affect user interface, toolbar and backend interactions.

    See also

    Documentation for Python, JavaScript or R
    See more

    Declaration

    Swift

    public struct Config : Encodable
  • TODO.

    See more

    Declaration

    Swift

    public struct Frame : Encodable
  • TODO.

    See more

    Declaration

    Swift

    public struct Animation : Encodable
  • Functions for converting Figures to HTML documents rendered via Plotly.js.

    See more

    Declaration

    Swift

    public struct HTML
  • Simple in-memory CSV data representation decoder.

    Compared to other formats, CSV representation is very limited. It doesn’t support decoding of nested values or direct decoding of primitive values. Unless the type to be decoded has a dedicated init(from: Decoder) method, it is only possible to decode an array of the type.

    Here’s an example that decodes an array of simple structures:

    struct Person: Decodable {
      var id: Int
      var name: String
    }
    
    let csv = """
    id,name
    1,"Thomas"
    "2",Gina
    """.data(encoding: .utf8)
    
    let decoder = CSVDecoder()
    let people = try? decoder.decode([Person].self, from: csv, encoding: .utf8)
    

    Bug

    • Only the comma , separator character is supported.
    • First line is always assumed to be the header consisting of column names.
    See more

    Declaration

    Swift

    public struct CSVDecoder