Tag: jchart2d

使用Chart2D的直方图

我想绘制JPEG的系数直方图。 我在谷歌上搜索了几个小时才知道如何使用Chart2D库,但是没有带有示例的教程。 我想要绘制的数组是hist[] 。 我创建了一个LBChart2D的对象,但我不知道如何将数组设置为数据集。 //coeff[] is the coefficients array for(int i=0;i<coeff.length;i++) hist[coeff[i]]++; LBChart2D lbChart2D = new LBChart2D(); 编辑:这是我正在尝试的: Object2DProperties object2DProps = new Object2DProperties(); object2DProps.setObjectTitleText (“Title “); Chart2DProperties chart2DProps = new Chart2DProperties(); chart2DProps.setChartBetweenChartAndLegendGapThicknessModel(5); LegendProperties legendProps = new LegendProperties(); legendProps .setLegendBorderThicknessModel(5); legendProps.setLegendBackgroundColor(Color.yellow); legendProps.setLegendExistence (false); GraphChart2DProperties graph2DProps = new GraphChart2DProperties(); GraphProperties graphProps = new GraphProperties(); object2DProps .setObjectTitleFontName(“test”); […]