Hi,
I am looking for the best scaling for exporting the chart. For example as
*.eps (org.jibble.epsgraphics). Found some hints about scaling of PNG,
but EPS works better for embedding in tex/pdf.
Code:
public void exportEPSChart(JFreeChart aChart, double width, double height,
String filename) throws IOException
{
Rectangle2D chartArea = new Rectangle2D.Double(0, 0, width, height);
Graphics2D eps = new EpsGraphics2D("demo");
aChart.draw(eps, chartArea, null);
FileOutputStream out = new FileOutputStream( filename );
PrintWriter writer = new PrintWriter(out, true);
writer.println(eps.toString().replaceAll("0.0 setmiterlimit", "1 setmiterlimit"));
out.close();
- width, height as the same dimension as the chart. Where do I find the size
of the chart
- given width, height as the optimum for print. Where can I change the size of the
chart?
Thanks in advance!