//Quotation inside is necessary for xlabel and other fields cause you could add more config code
String xlabel = "'x axis' textcolor rgbcolor 'dark-red'", ylabel = "'y axis'", extra = "set key top left";
};
//DataTableSet 1 2d add data one by one
DataTableSet dts1 = plot1.addNewDataTableSet("DataTableSet 2d");//use null to avoid the output of figure title for this dataset.
DataTable dt1 = dts1.addNewDataTable("x", 2);
DataTable dt2 = dts1.addNewDataTable("2x", 2);
DataTable dt3 = dts1.addNewDataTable("3x", 2);
DataTable dt4 = dts1.addNewDataTable("4x", 2);
DataTable dt5 = dts1.addNewDataTable("5x", 2);
DataTable dt6 = dts1.addNewDataTable("6x", 2);
DataTable dt7 = dts1.addNewDataTable("7x", 2);
DataTable dt8 = dts1.addNewDataTable("8x", 2);
DataTable dt9 = dts1.addNewDataTable("9x", 2);
DataTable dt10 = dts1.addNewDataTable("10x", 2);
for (int i = 0; i < 5; i++) {
dt1.add(i, i);
dt2.add(i, 2 * i);
dt3.add(i, 3 * i);
dt4.add(i, 4 * i);
dt5.add(i, 5 * i);
dt6.add(i, 6 * i);
dt7.add(i, 7 * i);
dt8.add(i, 8 * i);
dt9.add(i, 9 * i);
dt10.add(i, 10 * i);
}
//DataTableSet 2 3d add data using prepared lists
DataTableSet dts2 = plot1.addNewDataTableSet("DataTableSet 3d");
List x = new ArrayList(), y = new ArrayList(), z1 = new ArrayList(), z2 = new ArrayList();
for (double i = -2; i <= 2; i += 0.5) {