Using KST for graphing

In the last year of my physics degree I did some work for the physics department developing a sun tracking sensor for a balloon based telescope. I got to use a great piece of free and open source graphing software called KST. Its a program designed specificely for plotting large amounts of scientific data. From the KST website:

"Kst is the fastest real-time large-dataset viewing and plotting tool available and has basic data analysis functionality. Kst contains many powerful built-in features and is expandable with plugins and extensions. Extensive help is available, both from within kst and on the web. Kst is a KDE application and is freely available for anyone to download and use."

Its a great program to use to plot energy monitor data. Here's an example of data being plotted from the non-invasive current trasformer method:

How to install on Ubuntu

In a terminal window type: $ sudo apt-get install kst

On windows

If you're a windows user, KST can be downloaded here.

How to start graphing

  1. First, you will need ArduinoComm which is detailed here.
  2. Run the program with $ java Program >tmp.dat. The addition of >tmp.dat at the end of the run command line writes the java program output to a file for storage.
  3. Run KST by typing $ kst
  4. Once KST is open, click the magic wand button: the data wizard.
  5. Find your tmp.dat file and click next
  6. Move all available data Fields to the selected data field box by clicking the right arrow.
  7. Click on the 'Next' button, and again, then click 'Finish'
  8. You should see several graphs as in the picture above and they should be updating in real time.
  9. To get KST to calculate and display useful stats like Standard Deviation, Mean, etc. click on the text label then select from the 'insert scalar in label' drop down box

Update Aug 2013:



Getting up and running with KST in with Ubuntu 13.04

Install KST through Ubuntu Software Centre or in terminal by running the following. I used KST V2.0.3

$ sudo apt-get install kst

Install the Java JDK. This was already installed for me, not sure if it's installed as standard. 

$ sudo apt-get install openjdk-7-jdk

Download arduinocomm from
Extract and open window in terminal and compile with

$ javac *.java

Download RXTX Linux binary from: (I used 2.1-7r2)

copy, to and RXTXcomm.jar to java folder. Mine was:


$ sudo cp /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext
$ sudo cp /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext
$ sudo cp RXTXcomm.jar /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext

Edit in a text editor to set the serial port and speed (e.g. myArduino.start("/dev/ttyUSB0",9600);)

To run Arduinocomm type:

$ sudo java Program

You should see serial data in the terminal window.  To log to tmp.dat, run:

$ sudo java Program >tmp.dat