This method is the focus of the entire JFreeChart library. @param g2 the graphics device. @param area the area within which the chart should be drawn.
260261262263264265266267268269270
try { BufferedImage image = new BufferedImage(200 , 100, BufferedImage.TYPE_INT_RGB); Graphics2D g2 = image.createGraphics(); chart.draw(g2, new Rectangle2D.Double(0, 0, 200, 100), null, new ChartRenderingInfo()); g2.dispose(); success = true; } catch (Exception e) {
303304305306307308309310311312313
3637383940414243444546
int i = 0; timer.start(); do { if (finished) break; jfreechart.draw(graphics2d, double1, null, null); System.out.println("Charts drawn..." + i); if (!finished) i++; } while (true); System.out.println("DONE");
4445464748495051525354
int j = 0; timer.start(); do { if (finished) break; jfreechart.draw(graphics2d, double1, null, null); System.out.println("Charts drawn..." + j); if (!finished) j++; } while (true); System.out.println("DONE");
4041424344454647484950
timer.start(); do { if (finished) break; jfreechart.draw(graphics2d, double1, null, null); System.out.println("Charts drawn..." + i); if (!finished) i++; } while (true); System.out.println("DONE");
3334353637383940414243
357358359360361362363364365366367
boolean success = false; try { BufferedImage image = new BufferedImage(200 , 100, BufferedImage.TYPE_INT_RGB); Graphics2D g2 = image.createGraphics(); chart.draw(g2, new Rectangle2D.Double(0, 0, 200, 100), null, null); g2.dispose(); success = true; } catch (Exception e) { success = false;
643644645646647648649650651652653
13581359136013611362136313641365136613671368
VectorGraphics g = new PSGraphics2D(new File("pics/SU_sub"+i+".eps"), new java.awt.Dimension(xEdge+50,yEdge+50)); g.setProperties(p); g.startExport(); //jpanel.print(g); Rectangle2D r2D = new Rectangle2D.Double(0,0, xEdge+50,yEdge+50); jfreechart.draw(g, r2D); g.endExport(); } for(int i = 0 ; i < numExp; i++) {
13711372137313741375137613771378137913801381
VectorGraphics g = new PSGraphics2D(new File("pics/MU_sub"+i+".eps"), new java.awt.Dimension(xEdge+50,yEdge+50)); g.setProperties(p); g.startExport(); //jpanel.print(g); Rectangle2D r2D = new Rectangle2D.Double(0,0, xEdge+50,yEdge+50); jfreechart.draw(g, r2D); g.endExport(); } for(int i = 0 ; i< numExp; i++) {