JavaPlot 图只用了一半 canvas

JavaPlot graph only uses half of canvas

我正在尝试使用 JavaPlot 自动绘制一些数据。关于图形的所有内容都生成得很好,但它只使用了 canvas 的一半。我可以调整 canvas 大小,图表会相应地调整,始终使用 canvas 的一半。我似乎找不到任何可以解决此问题的方法。

JavaPlot jPlot = new JavaPlot();
String norm = normalized ? "Normalized" : "Absolute";
PostscriptTerminal epsf = new PostscriptTerminal(String.format("output/graphs/%s_%s_%s.pdf", dataset.toString(), distribution.getName(), norm));
jPlot.setTerminal(epsf);
jPlot.setTitle(String.format("%s %s %s", dataset.toString(),
distribution.getName(), norm));
jPlot.getAxis("x").setLabel("Budget");
jPlot.getAxis("y").setLabel((norm) + " Performance");
jPlot.setKey(JavaPlot.Key.TOP_LEFT);

/* Adding data code not shown */

jPlot.newGraph();
jPlot.plot();

结果是 jPlot.newGraph() 调用,我认为这是将数据写入图表所必需的,实际上只是在原始图表旁边创建了一个新的空白图表。删除它解决了问题。