资 源 简 介
About simple-stats-api
This library provides very simple, very light weight statistical algorithms and visualization tools that can be used in Java.
Many statistical visualization programs available in the open-source community tend to be complex in generating plots. This project is aimed to provide the simplest histogram plot with the possibility to provide saving as image to the hard drive.
How to create Histograms
the library can be used this way:
Plot plot = new Histogram(Arrays.asList(1,2,1,2,1,3,4,1,5,6), "test histogram");
to save the histogram as an image:
plot.toPNG("path_to_png_file"); //dump the image to the hard disk
or just show it in a JComponent using g.draw( image ) or better and easier, use a JLabel and pass the histogram as an image icon argument like this:
JLabel histLabel = new JLabel( plot.getImageIcon() );
How to creat