+2  A: 

Look at Ruby-GD2 or an ImageMagick or GraphicsMagick binding.

greyfade
+5  A: 

In Python, you'd typically use PIL, the Python Image Library. I've never used PIL for anything beyond the simplest tasks, so I can't say how well it performs in practice.

I'd start digging into PIL with a look at its documentation, particularly the documentation for the draw module.

kquinn
+1: did it last week. Worked nicely -- creates on-the-fly charts.
S.Lott
+5  A: 

Maybe a vectorial format is better suited for your needs, but is hard to tell without having a concrete example of what you'd like to get.

For example, if the images are all alike, you could create a SVG base image with Inkscape, then edit it programmaticaly from Python or Ruby (either by editing the text or using a XML library) and finally export it to PNG.


Update: After seeing the example image, I think SVG would be the most convenient choice. A SVG image is an XML file that basically says "draw a circle from here to here, write the string '13º52' there", etc. You could draw a unique base chart in Inkscape and have your program just adding the lines and symbols for each case. Finally you export to PNG.

The advantages are: easier for you to draw, the image is fully scalable, you can change the styling just by editing a property ("make all lines wider", "change all text to Arial", "paint the background blue"), you can export to any format without losing quality, and I think it's more mantainable.

Roberto Bonvallet
Graphic link is above. The thing about vector formats is I'm not sure how portable they are; I don't expect my target audience to be very technical.
Charlie Martin
Vector formats make it easier to draw, and you could deliver the final image exported as PNG to your users.
Roberto Bonvallet
+2  A: 

I found Gruff easy to use when I was in your shoes. Shameless blog plug.

Gishu
+1  A: 

when I was doing python chalange (http://www.pythonchallenge.com/) I've used Python Image Library (http://www.pythonware.com/library/pil/)

bb
+2  A: 

For Python I the most common choice for image formats is PIL and then Pycairo for vector formats. The two can work together, for exadmple in this cookbook entry to use PIL images for Pycairo surfaces.

Van Gale