本文整理汇总了Java中javafx.scene.chart.StackedBarChart.setCategoryGap方法的典型用法代码示例。如果您正苦于以下问题:Java StackedBarChart.setCategoryGap方法的具体用法?Java StackedBarChart.setCategoryGap怎么用?Java StackedBarChart.setCategoryGap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.chart.StackedBarChart
的用法示例。
在下文中一共展示了StackedBarChart.setCategoryGap方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: build
import javafx.scene.chart.StackedBarChart; //导入方法依赖的package包/类
@Override
public Chart build() {
final CategoryAxis xAxis = new CategoryAxis();
xAxis.setLabel("AF");
final NumberAxis yAxis = new NumberAxis();
yAxis.setLabel("Count");
final XYChart.Series<String, Number> serie= new XYChart.Series<String, Number>();
serie.setName(xAxis.getLabel());
for(final Limit limit :this.limits)
{
if(this.afindexcount.count(limit.index)==0L) continue;
serie.getData().add(new XYChart.Data<String,Number>(
limit.label,
this.afindexcount.count(limit.index))
);
}
final StackedBarChart<String, Number> sbc =
new StackedBarChart<String, Number>(xAxis, yAxis);
sbc.setTitle("Allele Frequency"+(this.nSamples>0?" (Nbr. Sample(s):"+this.nSamples+")":""));
sbc.getData().add(serie);
sbc.setCategoryGap(0.2);
sbc.setLegendVisible(false);
return sbc;
}
示例2: build
import javafx.scene.chart.StackedBarChart; //导入方法依赖的package包/类
@Override
public Chart build() {
final CategoryAxis xAxis = new CategoryAxis();
xAxis.setLabel("Sample");
final NumberAxis yAxis = new NumberAxis();
yAxis.setLabel("Count");
final List<XYChart.Series<String, Number>> type2count =new ArrayList<>(3);
for(int i=0;i<2;++i) {
final XYChart.Series<String, Number> serie= new XYChart.Series<String, Number>();
serie.setName(i==0?"Transition":"Transversion");
type2count.add(serie);
if( this.sample2titv.isEmpty())
{
serie.getData().add(new XYChart.Data<String,Number>(
"ALL",
(i==0?all.transition:all.transvertion)
));
}
else
{
for(final String sampleName : this.sample2titv.keySet())
{
final TiTv titv= this.sample2titv.get(sampleName);
serie.getData().add(new XYChart.Data<String,Number>(
sampleName,
(i==0?titv.transition:titv.transvertion)
));
}
}
}
final StackedBarChart<String, Number> sbc =
new StackedBarChart<String, Number>(xAxis, yAxis);
sbc.setTitle(this.getName());
sbc.getData().addAll(type2count);
sbc.setCategoryGap(0.2);
return sbc;
}
示例3: build
import javafx.scene.chart.StackedBarChart; //导入方法依赖的package包/类
@Override
public Chart build() {
final CategoryAxis xAxis = new CategoryAxis();
xAxis.setLabel("Sample");
final NumberAxis yAxis = new NumberAxis();
yAxis.setLabel("Count");
final List<XYChart.Series<String, Number>> gtype2count=new ArrayList<>(GenotypeType.values().length);
for(final GenotypeType genotypeType :GenotypeType.values()) {
final XYChart.Series<String, Number> serie= new XYChart.Series<String, Number>();
serie.setName(genotypeType.name());
gtype2count.add(serie);
for(final String sampleName : this.sample2count.keySet())
{
serie.getData().add(new XYChart.Data<String,Number>(
sampleName,
this.sample2count.get(sampleName).count(genotypeType))
);
}
}
final StackedBarChart<String, Number> sbc =
new StackedBarChart<String, Number>(xAxis, yAxis);
sbc.setTitle(this.getName());
sbc.getData().addAll(gtype2count);
sbc.setCategoryGap(0.2);
return sbc;
}
示例4: build
import javafx.scene.chart.StackedBarChart; //导入方法依赖的package包/类
@Override
public StackedBarChart<String, Number> build()
{
final CategoryAxis xAxis = new CategoryAxis();
xAxis.setLabel("Flags");
final NumberAxis yAxis = new NumberAxis();
yAxis.setLabel("Count");
final XYChart.Series<String, Number> serie= new XYChart.Series<String, Number>();
serie.setName("Flags");
for(final Integer L : new TreeSet<Integer>(this.flags2count.keySet()))
{
serie.getData().add(new XYChart.Data<String,Number>(
String.valueOf(L),
this.flags2count.count(L))
);
}
final StackedBarChart<String, Number> sbc =
new StackedBarChart<String, Number>(xAxis, yAxis);
sbc.setTitle("SAM Flags");
sbc.getData().add(serie);
sbc.setCategoryGap(0.2);
sbc.setLegendVisible(false);
return sbc;
}
示例5: build
import javafx.scene.chart.StackedBarChart; //导入方法依赖的package包/类
@Override
public StackedBarChart<String, Number> build()
{
final CategoryAxis xAxis = new CategoryAxis();
xAxis.setLabel("Length");
final NumberAxis yAxis = new NumberAxis();
yAxis.setLabel("Count");
final XYChart.Series<String, Number> serie= new XYChart.Series<String, Number>();
serie.setName("Length");
for(final Integer L : new TreeSet<Integer>(this.length2count.keySet()))
{
serie.getData().add(new XYChart.Data<String,Number>(
String.valueOf(L),
this.length2count.count(L))
);
}
final StackedBarChart<String, Number> sbc =
new StackedBarChart<String, Number>(xAxis, yAxis);
sbc.setTitle("Reads Lengths");
sbc.getData().add(serie);
sbc.setCategoryGap(0.2);
sbc.setLegendVisible(false);
return sbc;
}
示例6: build
import javafx.scene.chart.StackedBarChart; //导入方法依赖的package包/类
@Override
public StackedBarChart<String, Number> build()
{
final CategoryAxis xAxis = new CategoryAxis();
xAxis.setLabel("Position in Read");
final NumberAxis yAxis = new NumberAxis();
yAxis.setLabel("Count");
final List<XYChart.Series<String, Number>> base2count=new ArrayList<>();
for(final CigarOperator cigarop:CigarOperator.values())
{
if(cigarop==CigarOperator.P) continue;
final XYChart.Series<String, Number> serie= new XYChart.Series<String, Number>();
serie.setName(cigarop.name());
base2count.add(serie);
for(int i=0;i< this.cigar2pos2count.size();++i)
{
serie.getData().add(new XYChart.Data<String,Number>(
String.valueOf(i+1),
this.cigar2pos2count.get(i).count(cigarop))
);
}
}
final StackedBarChart<String, Number> sbc =
new StackedBarChart<String, Number>(xAxis, yAxis);
sbc.setTitle(getName());
sbc.getData().addAll(base2count);
sbc.setCategoryGap(0.2);
return sbc;
}
示例7: build
import javafx.scene.chart.StackedBarChart; //导入方法依赖的package包/类
@Override
public StackedBarChart<String, Number> build()
{
final CategoryAxis xAxis = new CategoryAxis();
xAxis.setLabel("Position in Read");
final NumberAxis yAxis = new NumberAxis();
yAxis.setLabel("Count");
final List<XYChart.Series<String, Number>> base2count=new ArrayList<>(all_chars.size());
for(final Character base:all_chars) {
final XYChart.Series<String, Number> serie= new XYChart.Series<String, Number>();
serie.setName(base.toString());
base2count.add(serie);
for(int i=0;i< this.pos2base2count.size();++i)
{
serie.getData().add(new XYChart.Data<String,Number>(
String.valueOf(i+1),
this.pos2base2count.get(i).count(base))
);
}
}
final StackedBarChart<String, Number> sbc =
new StackedBarChart<String, Number>(xAxis, yAxis);
sbc.setTitle("Position/Base/Count");
sbc.getData().addAll(base2count);
sbc.setCategoryGap(0.2);
return sbc;
}