Hi everyone,
I not sure if you can plot a histogram in console mode but as for gui mode you can but it is extremely hard and difficult and most people tend to use third party packages. Try to google for them and you will a lot of them. There are also a few open source packages which you can use for free in your software development.
Yours Sincerely
Richard West
freesoft_2000
Practically a Master Poster
623 posts since Jun 2004
Reputation Points: 25
Solved Threads: 10
sure you can plot a histogram in console mode.
After all it's just a collation of data with one column or row for each value (a barchart).
Easiest on the commandline would be to use a line for each value and just print a single block or something for each number in your count.
Say you want to plot the array [2,3,4,6,3,4] which is the number of occurrances of something in your file (say specific words).
you'd print something like
++
+++
++++
++++++
+++
++++
That's easy enough to arrange for...
In a Swing application collecting the data works identically but you need something to create the graphical representation, which is where most people will indeed tend to use existing graphics packages but using a simple Graphics or Image object you could get there as well.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337