List of usage examples for org.jfree.chart ChartUtils saveChartAsJPEG
public static void saveChartAsJPEG(File file, JFreeChart chart, int width, int height) throws IOException
From source file:net.sf.mzmine.chartbasics.graphicsexport.ChartExportUtil.java
public static void writeChartToJPEG(JFreeChart chart, int width, int height, File fileName) throws IOException { ChartUtils.saveChartAsJPEG(fileName, chart, width, height); }
From source file:net.atomique.ksar.graph.Graph.java
public int saveJPG(final String filename, final int width, final int height) { try {// ww w . j av a 2s. c om ChartUtils.saveChartAsJPEG(new File(filename), this.getgraph(mysar.myparser.getStartOfGraph(), mysar.myparser.getEndOfGraph()), width, height); } catch (IOException e) { log.error("Unable to write to : {}", filename); return -1; } return 0; }