This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes want to make a distribution graph~~~ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "want to make a distribution graph~~~" Watch "want to make a distribution graph~~~" New topic

want to make a distribution graph~~~

Alex cordes

Joined: Nov 15, 2005
Posts: 15
just wonder is there any way to make a distribution graph of a data?
just searched for it on the net, cant get a code or example... ...
anyone know how to make it?
many thanks~~~
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3740

First, I recommend converting the data to some simplistic format like XML so it can be made uniform and easy to read. For Java graphing, there's a ton of SourceForge projects as well as proprietary chart programs, and some are better than others.

The reason I recommend the XML is that at least if you pick a particular format you can more easily migrating it to something else later.

[OCA 8 Book] [Blog]
Alex cordes

Joined: Nov 15, 2005
Posts: 15
OK, thanks for ur reply... seems too hard for me~~~
do u know how to make a table for a data? whats its code?
Ben Wood
Ranch Hand

Joined: Aug 14, 2001
Posts: 342

Firstly, if you want to make a graph you can use Java2D, I'm sure if you search around you will be able to find a basic tutorial to get you started.

If you want to put data ina table take a look at javax.swing.JTable. You can construct one of those by passing in two arrays for example

where data is a two dimensional array of your data values (like a grid of rows and columns), and columnNames is a 1 dimension array of column names.

SCJP 1.4,
Have you checked out Aspose?
subject: want to make a distribution graph~~~
It's not a secret anymore!