-- the density of states of three levels, broadened by 0.2 eV G = ResponseFunction.New({ {0, -2, 0.5, 3}, {0.3, 0.5, 0.2}, mu = 0, type = "ListOfPoles" }) pl = Graphics.Plot(G/Pi, 0.2, {{"plotRe",false}, {"Negate",true}, {"Frame",{{"Xmin",-4}, {"Xmax",4}, {"Ymin",-0.1}, {"Ymax",1.8}, {"FirstYTick",0}, {"dYTick",0.5}, {"YFormat","%.1f"}, {"XLabel","energy (eV)"}, {"YLabel","density of states"}, {"XLMargin",0.1}, {"YAxis",-10}}}}) -- the plot as an encapsulated PostScript file PS = Graphics.ToPS(pl) print(string.match(PS, "%%%%BoundingBox:[^\n]*")) file = io.open("DOS.ps", "w") file:write(PS) file:close()