mpids-user Geschrieben November 13, 2017 at 11:21 Geschrieben November 13, 2017 at 11:21 Moin, moin After spending some time to figure out how to plot a file written by the Brick Viewer data logger using gnuplot, I thought I share a working template here. If you bunzip2 the attached CSV file and then run gnuplot template.plt you will obtain test.ps which shows on the left and right ordinate temperature and humidity data logged over roughly one week. If you are unfamiliar with gnuplot, the template will a bit cryptic and you probably want to first tinker around with some resources such as e.g. https://www.cs.hmc.edu/~vrable/gnuplot/using-gnuplot.html or http://www.dcf.ds.mpg.de/index.php?id=1470 . The main trick is to identify for each plotting command all lines which belong to a given bricklet. This is done with: plot "test.csv" u 1:(strcol(3) eq "9i9" ? $5/100 : 1/0) where we plot the first column (time) against the all lines coming from one specific bricklet using the (if ? then : else) operator. First the string comparison (eq) compares column 3, after converting it to a string (strcol(3)), with the uid of the bricklet of interest. If the comparison is true, the y-value is set to column 5 divided by 100 (which rescales the output of a temperature bricklet to Celsius). Else the line belongs to another bricklet and the y-value is set to 1/0, which is undefined and therefore ignored. the gardenertest.csv.bz2template.plttest.ps Zitieren
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.