本文整理汇总了Java中de.linearbits.subframe.graph.PlotHistogramClustered类的典型用法代码示例。如果您正苦于以下问题:Java PlotHistogramClustered类的具体用法?Java PlotHistogramClustered怎么用?Java PlotHistogramClustered使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PlotHistogramClustered类属于de.linearbits.subframe.graph包,在下文中一共展示了PlotHistogramClustered类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: analyze
import de.linearbits.subframe.graph.PlotHistogramClustered; //导入依赖的package包/类
/**
* Performs the analysis
* @param file
* @return
* @throws ParseException
*/
private static PlotGroup analyze(CSVFile file) throws ParseException{
// Selects all rows
Selector<String[]> selector = file.getSelectorBuilder().field("Polygamma").equals("true").or().equals("false").build();
Series3D series = new Series3D(file, selector,
new Field("Dataset"),
new Field("Polygamma"),
new Field("Check", Analyzer.VALUE));
series.transform(new Function<Point3D>(){
@Override
public Point3D apply(Point3D arg0) {
return new Point3D(arg0.x,
arg0.y.equals("true") ? "With polygamma" : "Without polygamma",
arg0.z);
}
});
List<Plot<?>> plots = new ArrayList<Plot<?>>();
plots.add(new PlotHistogramClustered("",
new Labels("Dataset", "Time per check [ms]"),
series));
GnuPlotParams params = new GnuPlotParams();
params.rotateXTicks = 0;
params.keypos = KeyPos.TOP_LEFT;
params.size = 1.0d;
params.ratio = 0.5d;
return new PlotGroup("Comparison of execution times of using the Pitman model with and without the polygamma optimization", plots, params, 1.0d);
}
示例2: analyze
import de.linearbits.subframe.graph.PlotHistogramClustered; //导入依赖的package包/类
/**
* Performs the analysis
* @param file
* @return
* @throws ParseException
*/
private static PlotGroup analyze(CSVFile file) throws ParseException{
// Selects all rows
Selector<String[]> selector = file.getSelectorBuilder().field("Binary").equals("true").or().equals("false").build();
Series3D series = new Series3D(file, selector,
new Field("Dataset"),
new Field("Binary"),
new Field("Check", Analyzer.VALUE));
series.transform(new Function<Point3D>(){
@Override
public Point3D apply(Point3D arg0) {
return new Point3D(arg0.x,
arg0.y.equals("true") ? "With binary search" : "Without binary search",
arg0.z);
}
});
List<Plot<?>> plots = new ArrayList<Plot<?>>();
plots.add(new PlotHistogramClustered("",
new Labels("Dataset", "Time per check [ms]"),
series));
GnuPlotParams params = new GnuPlotParams();
params.rotateXTicks = 0;
params.keypos = KeyPos.TOP_LEFT;
params.size = 1.0d;
params.ratio = 0.5d;
return new PlotGroup("Comparison of execution times of using the Pitman model with and without the binary search optimization", plots, params, 1.0d);
}
示例3: testClusteredHistogram
import de.linearbits.subframe.graph.PlotHistogramClustered; //导入依赖的package包/类
@Test
public void testClusteredHistogram(){
try {
CSVFile file = new CSVFile(new File("src/test/test2.csv"));
Selector<String[]> selector = file.getSelectorBuilder()
.field("Run").equals("Test")
.build();
Series3D series = new Series3D(file, selector,
new Field("Size"),
new Field("Phase"),
new Field("Execution time", Analyzer.VALUE),
new BufferedArithmeticMeanAnalyzer());
PlotHistogramClustered plot = new PlotHistogramClustered("Creating, sorting and summing up arrays of different sizes",
new Labels("Size", "Execution time [ns]"),
series);
GnuPlotParams params = new GnuPlotParams();
params.rotateXTicks = -90;
params.keypos = KeyPos.TOP_LEFT;
GnuPlot.plot(plot, params, "src/test/test2_5");
checkAndDelete("src/test/test2_5.pdf");
} catch (Exception e) {
fail(e.getMessage());
}
}
示例4: getGroup1
import de.linearbits.subframe.graph.PlotHistogramClustered; //导入依赖的package包/类
/**
* Returns the first plot group
* @param file
* @return
* @throws ParseException
*/
private PlotGroup getGroup1(CSVFile file) throws ParseException{
Selector<String[]> selector = file.getSelectorBuilder()
.field("Run").equals("Test")
.build();
Series3D series = new Series3D(file, selector,
new Field("Size"),
new Field("Phase"),
new Field("Execution time", Analyzer.VALUE),
new BufferedArithmeticMeanAnalyzer());
List<Plot<?>> list = new ArrayList<Plot<?>>();
list.add(new PlotHistogramClustered("Creating, sorting and summing up arrays of different sizes",
new Labels("Size", "Execution time [ns]"),
series));
list.add(new PlotHistogramStacked("Creating, sorting and summing up arrays of different sizes",
new Labels("Size", "Execution time [ns]"),
series));
list.add(new PlotLinesClustered("Creating, sorting and summing up arrays of different sizes",
new Labels("Size", "Execution time [ns]"),
series));
GnuPlotParams params = new GnuPlotParams();
params.rotateXTicks = -90;
params.keypos = KeyPos.TOP_LEFT;
params.size = 0.6d;
return new PlotGroup("Clustered plots", list, params, 0.5d);
}
示例5: GnuPlotHistogramClustered
import de.linearbits.subframe.graph.PlotHistogramClustered; //导入依赖的package包/类
/**
* Creates a new plot
*
* @param plot
* @param params
*/
protected GnuPlotHistogramClustered(PlotHistogramClustered plot, GnuPlotParams params) {
super(plot, params);
}