Class JFreeChartUtilities


  • public class JFreeChartUtilities
    extends Object
    Some utilities for JFreeChart
    Author:
    Christian Fries
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.jfree.chart.JFreeChart getCategoryLinesPlotChart​(String title, String xAxisLabel, String xAxisNumberFormat, String yAxisLabel, String yAxisNumberFormat, org.apache.commons.math3.linear.RealMatrix xyData)  
      static org.jfree.chart.JFreeChart getContourPlot​(String labelX, String labelY, String labelZ, org.apache.commons.math3.linear.RealMatrix dataMatrix)  
      static org.jfree.chart.JFreeChart getContourPlot​(org.jfree.data.xy.DefaultXYZDataset dataset, org.jfree.chart.renderer.xy.XYBlockRenderer renderer, HuePaintScale paintScale, org.jfree.chart.axis.NumberAxis xAxis, org.jfree.chart.axis.NumberAxis yAxis, org.jfree.chart.axis.NumberAxis zAxis, int xItems, int yItems)  
      static org.jfree.chart.JFreeChart getXYLinesPlotChart​(String title, String xAxisLabel, String xAxisNumberFormat, String yAxisLabel, String yAxisNumberFormat, double[] xValues, double[] yValues)  
      static org.jfree.chart.JFreeChart getXYLinesPlotChart​(String title, String xAxisLabel, String xAxisNumberFormat, String yAxisLabel, String yAxisNumberFormat, org.apache.commons.math3.linear.RealMatrix xyData)  
      static org.jfree.chart.JFreeChart getXYPlotChart​(String title, String xAxisLabel, String xAxisNumberFormat, String yAxisLabel, String yAxisNumberFormat, org.jfree.data.xy.XYSeriesCollection data)  
      static org.jfree.chart.JFreeChart getXYPlotChart​(String title, String xAxisLabel, String xAxisNumberFormat, String yAxisLabel, String yAxisNumberFormat, org.jfree.data.xy.XYSeriesCollection data, org.jfree.chart.renderer.xy.AbstractXYItemRenderer renderer)  
      static org.jfree.chart.JFreeChart getXYPlotChart​(String title, String xAxisLabel, String xAxisNumberFormat, String yAxisLabel, String yAxisNumberFormat, org.jfree.data.xy.XYSeriesCollection data, org.jfree.chart.renderer.xy.AbstractXYItemRenderer renderer, boolean legend)  
      static org.jfree.chart.JFreeChart getXYPlotLogChart​(String title, String xAxisLabel, String xAxisNumberFormat, String yAxisLabel, String yAxisNumberFormat, org.jfree.data.xy.XYSeriesCollection data, org.jfree.chart.renderer.xy.AbstractXYItemRenderer renderer, boolean legend)  
      static void saveChartAsJPG​(File file, org.jfree.chart.JFreeChart chart, int width, int height)
      Write a chart to an file stream in JPG format.
      static void saveChartAsPDF​(File file, org.jfree.chart.JFreeChart chart, int width, int height)
      Write a chart to an file stream in PDF format.
      static void saveChartAsPNG​(File file, org.jfree.chart.JFreeChart chart, int width, int height)
      Write a chart to an file stream in JPG format.
      static void saveChartAsSVG​(File file, org.jfree.chart.JFreeChart chart, int width, int height)
      Write a chart to an file stream in SVG format.
      static void updateContourPlot​(org.jfree.data.xy.DefaultXYZDataset dataset, org.jfree.chart.renderer.xy.XYBlockRenderer renderer, HuePaintScale paintScale, org.jfree.chart.axis.NumberAxis xAxis, org.jfree.chart.axis.NumberAxis yAxis, org.jfree.chart.axis.NumberAxis zAxis, int xItems, int yItems)  
    • Constructor Detail

      • JFreeChartUtilities

        public JFreeChartUtilities()
    • Method Detail

      • getContourPlot

        public static org.jfree.chart.JFreeChart getContourPlot​(String labelX,
                                                                String labelY,
                                                                String labelZ,
                                                                org.apache.commons.math3.linear.RealMatrix dataMatrix)
      • getContourPlot

        public static org.jfree.chart.JFreeChart getContourPlot​(org.jfree.data.xy.DefaultXYZDataset dataset,
                                                                org.jfree.chart.renderer.xy.XYBlockRenderer renderer,
                                                                HuePaintScale paintScale,
                                                                org.jfree.chart.axis.NumberAxis xAxis,
                                                                org.jfree.chart.axis.NumberAxis yAxis,
                                                                org.jfree.chart.axis.NumberAxis zAxis,
                                                                int xItems,
                                                                int yItems)
      • updateContourPlot

        public static void updateContourPlot​(org.jfree.data.xy.DefaultXYZDataset dataset,
                                             org.jfree.chart.renderer.xy.XYBlockRenderer renderer,
                                             HuePaintScale paintScale,
                                             org.jfree.chart.axis.NumberAxis xAxis,
                                             org.jfree.chart.axis.NumberAxis yAxis,
                                             org.jfree.chart.axis.NumberAxis zAxis,
                                             int xItems,
                                             int yItems)
      • getXYLinesPlotChart

        public static org.jfree.chart.JFreeChart getXYLinesPlotChart​(String title,
                                                                     String xAxisLabel,
                                                                     String xAxisNumberFormat,
                                                                     String yAxisLabel,
                                                                     String yAxisNumberFormat,
                                                                     double[] xValues,
                                                                     double[] yValues)
      • getXYLinesPlotChart

        public static org.jfree.chart.JFreeChart getXYLinesPlotChart​(String title,
                                                                     String xAxisLabel,
                                                                     String xAxisNumberFormat,
                                                                     String yAxisLabel,
                                                                     String yAxisNumberFormat,
                                                                     org.apache.commons.math3.linear.RealMatrix xyData)
      • getCategoryLinesPlotChart

        public static org.jfree.chart.JFreeChart getCategoryLinesPlotChart​(String title,
                                                                           String xAxisLabel,
                                                                           String xAxisNumberFormat,
                                                                           String yAxisLabel,
                                                                           String yAxisNumberFormat,
                                                                           org.apache.commons.math3.linear.RealMatrix xyData)
      • getXYPlotChart

        public static org.jfree.chart.JFreeChart getXYPlotChart​(String title,
                                                                String xAxisLabel,
                                                                String xAxisNumberFormat,
                                                                String yAxisLabel,
                                                                String yAxisNumberFormat,
                                                                org.jfree.data.xy.XYSeriesCollection data)
      • getXYPlotChart

        public static org.jfree.chart.JFreeChart getXYPlotChart​(String title,
                                                                String xAxisLabel,
                                                                String xAxisNumberFormat,
                                                                String yAxisLabel,
                                                                String yAxisNumberFormat,
                                                                org.jfree.data.xy.XYSeriesCollection data,
                                                                org.jfree.chart.renderer.xy.AbstractXYItemRenderer renderer)
      • getXYPlotChart

        public static org.jfree.chart.JFreeChart getXYPlotChart​(String title,
                                                                String xAxisLabel,
                                                                String xAxisNumberFormat,
                                                                String yAxisLabel,
                                                                String yAxisNumberFormat,
                                                                org.jfree.data.xy.XYSeriesCollection data,
                                                                org.jfree.chart.renderer.xy.AbstractXYItemRenderer renderer,
                                                                boolean legend)
      • getXYPlotLogChart

        public static org.jfree.chart.JFreeChart getXYPlotLogChart​(String title,
                                                                   String xAxisLabel,
                                                                   String xAxisNumberFormat,
                                                                   String yAxisLabel,
                                                                   String yAxisNumberFormat,
                                                                   org.jfree.data.xy.XYSeriesCollection data,
                                                                   org.jfree.chart.renderer.xy.AbstractXYItemRenderer renderer,
                                                                   boolean legend)
      • saveChartAsPDF

        public static void saveChartAsPDF​(File file,
                                          org.jfree.chart.JFreeChart chart,
                                          int width,
                                          int height)
                                   throws IOException
        Write a chart to an file stream in PDF format.
        Parameters:
        file - The file to write to.
        chart - The chart to write.
        width - The width.
        height - The height.
        Throws:
        IOException - Thrown if the file could not be written.
      • saveChartAsSVG

        public static void saveChartAsSVG​(File file,
                                          org.jfree.chart.JFreeChart chart,
                                          int width,
                                          int height)
                                   throws IOException
        Write a chart to an file stream in SVG format.
        Parameters:
        file - The file to write to.
        chart - The chart to write.
        width - The width.
        height - The height.
        Throws:
        IOException - Thrown if the file could not be written.
      • saveChartAsJPG

        public static void saveChartAsJPG​(File file,
                                          org.jfree.chart.JFreeChart chart,
                                          int width,
                                          int height)
                                   throws IOException
        Write a chart to an file stream in JPG format.
        Parameters:
        file - The file to write to.
        chart - The chart to write.
        width - The width.
        height - The height.
        Throws:
        IOException - Thrown if the file could not be written.
      • saveChartAsPNG

        public static void saveChartAsPNG​(File file,
                                          org.jfree.chart.JFreeChart chart,
                                          int width,
                                          int height)
                                   throws IOException
        Write a chart to an file stream in JPG format.
        Parameters:
        file - The file to write to.
        chart - The chart to write.
        width - The width.
        height - The height.
        Throws:
        IOException - Thrown if the file could not be written.