From: "Zed A. Shaw" Date: 2005-12-13T10:59:10+09:00 Subject: Re: rendering charts via rails Hey "larry", There's several options, but currently many of them are very ugly in Rails. I've had mixed success with all of them, and most of them are fairly resource intensive (google for all of them): * ploticus -- This does an incredible number of plots, and is actually like it's own little programming language than a plotting package. It's graphs look like total ass though (classic GD is used I believe) and I wouldn't consider any of them publication worthy. * R -- R *is* a language in its own right, and I use it like crazy for my graphing. It does fantastic plots, somehow magically knows what to do with data you give it, and can plot publication ready plots to png, ps, pdf, jpg, and just about anything else you can think of for plotting. It can also read in CSV, Excel, SPSS, and other formats. It's a little difficult to learn at first, but try "Statistics: An Introduction Using R" by Crawley. If you're already statistics inclined (thank you!) then just go wade through the online docs and you'll get it. * statist -- Just started playing with this. Uses GNU plot to do some very simple statistics and graphs. Quite nice actually even though it's small and ANSI C. I'm kind of interested in make a Ruby binding to it. * rcairo -- If you need absolute control then cairo is great. The rcairo library is kind of lame since it's missing a few functions last time I checked. But, if you need to put very nice dots and lines and transforms onto an image then this is the lib for you. Go this way if you're looking for raw 2D primitives. * rmagick -- Similar in purpose to rcairo but with lots of other raw image processing capabilities. Only used it lightly but many people really like it. * http://apples-to-oranges.com/blog/article.aspx?id=55 -- Saw this the other day which is pretty nice if you're doing simple bar graphs in a browser. They look better than some graphics packages. * gnuplot -- Just like ploticus you could call this from the command line, but man the plots look like total barf. * grace -- Some people like it. Haven't much success with getting it to work from the command line myself. * gnu plotutils -- This has a library for plotting stuff, but man do the GNU people have to use red for everything? * RubyGSL -- This is a full wrapper for the GNU Scientific Library but it also appears to include the plotutils as well. I've been meaning to play with this as it might just have all the stats and plotting stuff you need. But, as mentioned before the plots look like a dead puppy. There's a bunch of other ones, but if you're looking for directly inside Ruby I'm not sure if you will have much success. Other people better in the know for Ruby science stuff might be able to help. If I do plotting I almost always do it with R or use ploticus and spawn it off (although I'm not as good at ploticus as at R). Zed A. Shaw http://www.zedshaw.com/ On Tue, 13 Dec 2005 05:27:39 +0900 "larry" wrote: > Is there a recommended way to render charts from a ruby-based web > application like rails? I need a solution that is thread-safe without > serializing access to the chart generator. > > thanks > >