Giter Club home page Giter Club logo

plotty's Introduction

plotty - realtime (embedded) data visualization made easy

plotty at work

  • Ever wanted to inspect some sensor data captured by your arduino or other embedded system in realtime?
  • Ever wanted to fine-tune a PID controller but couldn't understand why it keeps oscillating?
  • Ever wanted to have a look at some recored .csv data but $YOUR_SPREADSHEET_APP can't zoom in using your mouse?

plotty might just be what you've been looking for.

basic usage

To have a quick look at plotty, just clone the repo and make sure you've installed the dependencies listed below. Then start plotty in simulation mode:

$ cd plotty
$ python main.py
  • Move the plott area with your left mouse button.
  • Zoom into details with your mouse wheel.
  • Fancy X- and Y-axis zooming with your right mouse button - try it and get addicted!
  • Reset to normal by clicking on the small "A" at the bottom left if you got lost in your data ;)

configuration

To make plotty plot real life data generated by your dev-board, just dump the data continuously as space-separated float values through your serial debug shell using some code on the embedded side like this:

printf("%f %f %f\n", valueA, valueB, valueC);

In the plotty directory, edit config.json to suit your needs:

{
    "inputStream": "simulation",
    "baud": 921600,
    "sampleRate": 1000,
    "bufferSize": 10000,
    "theme": "solarizedDark",
    "channels":
    [
        {"legend": "Temp[°C]",       "color": "orange"},
        {"legend": "Pressue[hPa]",   "color": "green"},
        {"legend": "Humidity[%rel]", "color": "cyan"}
    ]
}
  • Replace "simulation" with your actual serial data source for example "/dev/ttyUSB0" on Linux or "COM3" on Windows.
  • The "baud"-rate has only to be specified correcly on Windows.
  • "sampleRate" is the number of lines you transmit per second.
  • "bufferSize" is the depth of data buffer of each channel. Reduce this, if your PC is to slow...
  • "theme" specifies the theme. Currently solarizedDark and solarizedLight are available out of the box.
  • In the "channels" section, you specifiy the "legend"-string to be printed in your plot and the "color" of the plotted line (for each channel).

You can add or remove channels to suite your needs by adding or removing lines from the "channels" list. Currently, the following colors are supported: yellow, orange, red, magenta, violet, blue, cyan, green.

creating own themes

Creating own themes is easy as well: Just duplicate one of the theme.json files within the /themes folder and change the RGB values to your wishes. Then add the name of the new theme to the config.json like this (just add the name of the theme without the .json extension):

...
    "theme": "myTheme"
...

static data analysis

If you just want to have a look at a huge set of static data like an exported .csv file, just point to the file:

...
    "inputStream": "./testdata.csv"
...

NOTE: To plot files, the data has to be space separated floating point values. Make sure to not have more values per line than channels configured in your config.json.

dependencies

  • python3
  • pyqtgraph
  • pyqt4
  • numpy
  • pyserial (required on Windows only)

credits

plotty's People

Contributors

wullewutz avatar

Stargazers

michellewii avatar

Watchers

 avatar

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.