Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Graph Plotting  RSS feed

 
Virendra Warke
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need a help.about whether it is possible to plot a graph with reference to X-Y co-ordinate system in java.If yes Can anybody suggest me how to do it.Is their any API available in java,if yes which?
 
Amit Agarwal
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Virendra,
It is indeed possible to plot a X-Y graph using Java. You need to look at the Java2D API which is a part of JDK1.3 in the java.awt.geom package.
You can use the GeneralPath class to construct your curve/plot.
The only big consideration is that the default coordinate system of Java is reverse in the Y-axis. You can either manipulate it yourself or modify the User Coordinate System.
Good Luck.
--------------
Amit Agarwal
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!