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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations