为什么我的条形图中的所有条形图都不是红色的?

时间:2014-11-21 10:23:18

标签: jfreechart histogram

不知怎的,我在我的直方图中得到一些白色条,任何想法为什么?

http://www.directupload.net/file/d/3811/aybobuxf_png.htm

int number = 155897;//max number of Pixels   
HistogramDataset dataset = new HistogramDataset(); //create a Histogram   
dataset.setType(HistogramType.RELATIVE_FREQUENCY);     
dataset.addSeries("Histogram",doubleArray,number);     
String plotTitle = "Histogram";    
String xaxis = "pixel";     
String yaxis = "intensity";     
PlotOrientation orientation = PlotOrientation.VERTICAL;//sets the vertical orientation of the Histogram       
boolean show = false;      
boolean toolTips = false;     
boolean urls = false;     
JFreeChart chart = ChartFactory.createHistogram( plotTitle, xaxis, yaxis,
dataset, orientation, show, toolTips, urls);    
int widthg = 500;     
int heightg = 300;     
try {     
ChartUtilities.saveChartAsPNG(new File("histogram41.PNG"), chart, widthg, heightg);      
} catch (IOException e) {}    
}}

0 个答案:

没有答案