Git Product home page Git Product logo

elm-plot's Introduction

Elm Plot

A library for plotting using SVG and Elm. You can take a look here!

Philosophy

This library may differ slightly from common ones around in the way that it does not only aim to provide tools to make whatever visualization you need, but also guide you to make better visualizations. Better is of course subjective, but this library chooses to follow the school of Edward Tufte, author of the book The Visual Display of Quantitative Information. His ideas on ideal visualizations are well summarized by the following quote.

Graphical excellence is that which gives to the viewer the greatest number of ideas in the shortest time with the least ink in the smallest space. - Edward Tufte

However, if you find that these opinions are keeping you from doing something incredibly vital, then let's talk about it and see if it makes sense to allow it.

Features

Currently the library has the following features:

  • Series
    • Plain and area series.
    • Interpolations include none (a scatter), linear, and monotone-x.
  • Horizontally stacked bar charts / histograms.
  • All plots have the option for customizable axis, ticks and labels.

What is the API like?

Aiming to provide you with an easy start, the library has different levels of customizations. At a very basic level it could look like this:

    main =
      viewSeries
        [ area (List.map (\{ x, y } -> circle x y)) ]
        [ { x = 0, y = 1 }
        , { x = 2, y = 2 }
        , { x = 3, y = 3 }
        , { x = 4, y = 5 }
        , { x = 5, y = 8 }
        ]

You're welcome to take a look at the /docs folder for more examples!

Missing something?

Let me know! Open an issue (or PR) or write in slack. Please don't hesitate, I'm happy to answer any questions or receive feedback!

Development

Setup

elm package install
elm-reactor

and open docs (The docs contain a bunch of examples convenient for developing).

Compile the Docs

elm-live docs/src/Docs.elm --output=docs/docs.js

Tests

Tests are written with elm-test. For further information on elm-test check the documentation. All required dependencies are downloaded and installed when initially running the command.

elm-test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.