File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes Want simple X-Y graph, save as JPEG Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Want simple X-Y graph, save as JPEG" Watch "Want simple X-Y graph, save as JPEG" New topic
Author

Want simple X-Y graph, save as JPEG

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1034
I want to create a simple X-Y graph (with axes) with a few line segments, then save it to a JPEG for the IMG SRC in an image tag. Each line on the graph would be a different color. The graph background ("behind the axes") itself might have another image, say for the company the graph is for.

Is there a simple way to do this other than using the Java 2D API?

Looking over the 2D API, it looks like a lot of work would be necessary to do what I want to do.

Thanks very much in advance for any suggestions!

Mike
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39535
    
  27
If you're amenable to using a 3rd party API, have a look at JFreeChart or JChart2D. Both are on SourceForge and should be much less hassle than coming up with Java2D code for the same purpose.


Ping & DNS - updated with new look and Ping home screen widget
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1034
Sure, that sounds cool.

Thanks!!!

- Mike
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Want simple X-Y graph, save as JPEG
 
Similar Threads
save applet as image
how to draw a graph
XSLT vs JSP
Need help with Linear Equations.
How to create a new image file?