Search in sources :

Example 1 with ChartFrame

use of org.jfree.chart.ChartFrame in project Java-Matrix-Benchmark by lessthanoptimal.

the class MemoryRelativeBarPlot method displayWindow.

public void displayWindow(int width, int height) {
    ChartFrame window = new ChartFrame(chart.getTitle().getText(), chart);
    window.setMinimumSize(new Dimension(width, height));
    window.setPreferredSize(window.getMinimumSize());
    window.setVisible(true);
}
Also used : ChartFrame(org.jfree.chart.ChartFrame)

Example 2 with ChartFrame

use of org.jfree.chart.ChartFrame in project Java-Matrix-Benchmark by lessthanoptimal.

the class OverallRelativeAreaPlot method displayWindow.

public void displayWindow(int width, int height) {
    ChartFrame window = new ChartFrame(chart.getTitle().getText(), chart);
    window.setMinimumSize(new Dimension(width, height));
    window.setPreferredSize(window.getMinimumSize());
    window.setVisible(true);
}
Also used : ChartFrame(org.jfree.chart.ChartFrame)

Example 3 with ChartFrame

use of org.jfree.chart.ChartFrame in project Java-Matrix-Benchmark by lessthanoptimal.

the class SummaryWhiskerPlot method displayWindow.

public void displayWindow(int width, int height) {
    JFreeChart chart = createChart();
    ChartFrame window = new ChartFrame(chart.getTitle().getText(), chart);
    window.setMinimumSize(new Dimension(width, height));
    window.setPreferredSize(window.getMinimumSize());
    window.setVisible(true);
}
Also used : ChartFrame(org.jfree.chart.ChartFrame) JFreeChart(org.jfree.chart.JFreeChart)

Example 4 with ChartFrame

use of org.jfree.chart.ChartFrame in project Gemma by PavlidisLab.

the class VisualizeDataSetApp method showProfilesPolarView.

public void showProfilesPolarView(String title, Collection<double[]> dataCol, int numProfiles) {
    if (dataCol == null)
        throw new RuntimeException("dataCol cannot be " + null);
    JFreeChart chart = ChartFactory.createPolarChart(title, null, false, false, false);
    if (dataCol.size() < numProfiles) {
        VisualizeDataSetApp.log.info("Collection smaller than number of elements. Will display " + VisualizeDataSetApp.DEFAULT_MAX_SIZE + " profiles.");
        numProfiles = VisualizeDataSetApp.DEFAULT_MAX_SIZE;
    }
    Iterator<double[]> iter = dataCol.iterator();
    for (int j = 0; j < numProfiles; j++) {
        XYSeries series = this.getSeries(j, iter.next());
        PolarPlot plot = (PolarPlot) chart.getPlot();
        plot.setDataset(new XYSeriesCollection(series));
    }
    ChartFrame frame = new ChartFrame(title, chart, true);
    this.showWindow(frame);
}
Also used : XYSeries(org.jfree.data.xy.XYSeries) ChartFrame(org.jfree.chart.ChartFrame) PolarPlot(org.jfree.chart.plot.PolarPlot) XYSeriesCollection(org.jfree.data.xy.XYSeriesCollection) JFreeChart(org.jfree.chart.JFreeChart)

Example 5 with ChartFrame

use of org.jfree.chart.ChartFrame in project Energieverbrauchssimulator by duschdas2.

the class Diagramm method erzeugeEco.

// F�r Eco datenset Ausgabe
public static void erzeugeEco(String s) throws IOException {
    Reader reader = Files.newBufferedReader(Paths.get(s));
    CSVReader csvReader = new CSVReader(reader, ';');
    String[] header = csvReader.readNext();
    String[] nextLine;
    // Erstellt die Datens�tze f�r den Graphen aus dem Array
    DefaultCategoryDataset dataset = new DefaultCategoryDataset();
    // Minuten angabe
    int c = 1;
    while ((nextLine = csvReader.readNext()) != null) {
        // f�r jede Zeile ausf�hren
        for (int i = 0; i < header.length; i++) {
            // f�r jede Spalte(Ger�te) einmal ausf�hren
            dataset.addValue(Double.valueOf(nextLine[i]), header[i], Integer.toString(c));
        }
        // z�hlt die Minuten hoch
        c++;
    }
    // Erstellt den Graphen
    JFreeChart chart = ChartFactory.createLineChart("Real Eco Daten", "Zeit in Minuten", "Verbrauch in Watt", dataset, PlotOrientation.VERTICAL, true, true, false);
    Plot plot = chart.getPlot();
    plot.setBackgroundPaint(Color.black);
    // Erstellt das Frame zum abbilden des Graphen
    ChartFrame frame = new ChartFrame("Diagramm", chart);
    frame.pack();
    frame.setVisible(true);
}
Also used : ChartFrame(org.jfree.chart.ChartFrame) CSVReader(com.opencsv.CSVReader) XYPlot(org.jfree.chart.plot.XYPlot) Plot(org.jfree.chart.plot.Plot) CSVReader(com.opencsv.CSVReader) Reader(java.io.Reader) DefaultCategoryDataset(org.jfree.data.category.DefaultCategoryDataset) JFreeChart(org.jfree.chart.JFreeChart)

Aggregations

ChartFrame (org.jfree.chart.ChartFrame)10 JFreeChart (org.jfree.chart.JFreeChart)7 XYPlot (org.jfree.chart.plot.XYPlot)4 CSVReader (com.opencsv.CSVReader)2 Reader (java.io.Reader)2 Plot (org.jfree.chart.plot.Plot)2 DefaultCategoryDataset (org.jfree.data.category.DefaultCategoryDataset)2 XYSeries (org.jfree.data.xy.XYSeries)2 XYSeriesCollection (org.jfree.data.xy.XYSeriesCollection)2 ChartPanel (org.jfree.chart.ChartPanel)1 PolarPlot (org.jfree.chart.plot.PolarPlot)1 TextTitle (org.jfree.chart.title.TextTitle)1 MatrixSeries (org.jfree.data.xy.MatrixSeries)1 MatrixSeriesCollection (org.jfree.data.xy.MatrixSeriesCollection)1