Search in sources :

Example 1 with MatrixSeries

use of org.jfree.data.xy.MatrixSeries in project Gemma by PavlidisLab.

the class VisualizeDataSetApp method showProfilesBubbleChartView.

public void showProfilesBubbleChartView(String title, double[][] dataMatrix, int numProfiles) {
    if (dataMatrix == null)
        throw new RuntimeException("dataMatrix cannot be " + null);
    JFreeChart chart = ChartFactory.createXYLineChart(title, "Platform", "Expression Value", null, PlotOrientation.VERTICAL, false, false, false);
    MatrixSeries series = new MatrixSeries(title, dataMatrix[0].length, dataMatrix.length);
    XYPlot plot = chart.getXYPlot();
    plot.setDataset(new MatrixSeriesCollection(series));
    ChartFrame frame = new ChartFrame(title, chart, true);
    this.showWindow(frame);
}
Also used : ChartFrame(org.jfree.chart.ChartFrame) XYPlot(org.jfree.chart.plot.XYPlot) MatrixSeriesCollection(org.jfree.data.xy.MatrixSeriesCollection) MatrixSeries(org.jfree.data.xy.MatrixSeries) JFreeChart(org.jfree.chart.JFreeChart)

Aggregations

ChartFrame (org.jfree.chart.ChartFrame)1 JFreeChart (org.jfree.chart.JFreeChart)1 XYPlot (org.jfree.chart.plot.XYPlot)1 MatrixSeries (org.jfree.data.xy.MatrixSeries)1 MatrixSeriesCollection (org.jfree.data.xy.MatrixSeriesCollection)1