@Override
    public String getPlotString() {
        String dataString = "";
        synchronized (data) {
            if (data.size() > 0 && data.get(0).getMetaData().containsKey("StdDev")) {
                for (LinkInfo i : data) {
                    dataString += i.timestamp + " " + i.power + " " + (Double) i.getMetaData().get("StdDev") + "\n";
                }
                return "set terminal png\n set yrange [" + maxy + ":" + miny + "] \n plot '-' u 1:2:($3/2) title \"" + this.title + "( " + sourceNode + " -> " + destinationNode + " )\" with yerr, '-' u 1:2 title 'power' w fsteps\n" + dataString + "e\n" + dataString + "e\nquit\n";
            } else {
                for (LinkInfo i : data) {
                    dataString += i.timestamp + " " + i.power + "\n";
                }
                return "set terminal png\n set yrange [" + maxy + ":" + miny + "] \n plot '-' title \"" + this.title + "( " + sourceNode + " -> " + destinationNode + " )\" with linespoints\n" + dataString + "e\nquit\n";
            }
        }
    }