@Override
    public String getPlotString() {
        String dataString = "";
        String plotString = "set terminal png\n";

        plotString += "set title \"Link " + lastLinkInfo.sourceNode + "->" + lastLinkInfo.destinationNode + "\"\n";

        plotString += "set xrange [-25:15]\n set yrange [0:10]\n";
        plotString += "plot ";
        for (String type : data.keySet()) {
            if (data.get(type).size() > 0) {
                plotString += "'-' title \"" + type + "\" with circles,";
                for (DataPoint i : data.get(type)) {
                    dataString += i.position.x + " " + i.position.y + " 0.2\n";
                }
                dataString += "e\n";
            }
        }

        List<Neighbores> neighbores = (List<Neighbores>)lastLinkInfo.getMetaData().get("Neighbores");
        if (neighbores.size() > 0) {
            plotString += "'-' title \"Neighbores\" with circles fs solid,";
            for (Neighbores neighbore : neighbores) {
                dataString += neighbore.data.position.x + " " + neighbore.data.position.y + " 0.2\n";
            }
            dataString += "e\n";
        }

        plotString += "'-' title \"Current\" with circles fs solid";
        dataString += lastLinkInfo.power + " " + (Double) lastLinkInfo.metaData.get("StdDev") + " 0.2\ne\n";

        return plotString + "\n" + dataString;

    }