# GD2 to Make Charts

**URL:** <https://www.ruby-forum.com/t/gd2-to-make-charts/58978>\
**Category:** Rails\
**Created:** [April 27, 2006, 3:46pm UTC](https://www.ruby-forum.com/t/gd2-to-make-charts/58978 "2006-04-27T15:46:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ac8455/32.png) [@vanik](https://www.ruby-forum.com/u/vanik)\
**Post date:** [April 27, 2006, 3:46pm UTC](https://www.ruby-forum.com/t/gd2-to-make-charts/58978/1 "2006-04-27T15:46:32Z")

</div>

I’m just getting started with GD2 and have successfully made a few  
dynamic PNGs. I need to make some fairly detailed line graphs on the  
fly and I know that GD2 is capable of what I want but I strongly suspect  
I’m reinventing the wheel badly. Are there gems or other projects that  
help creating complex charts? I’ve used GDChart in the distant past  
but I can’t find info about it and ruby.

The specific feature that I need is the ability to control the color of  
each datapoint pip. I’m making statistical process control charts  
(XBAR/R) and out of control points should be highlighted in another  
color or shape.

Thanks!

Gary

---

<div class="post-metadata">

**Author:** ![vanik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ac8455/32.png) [@vanik](https://www.ruby-forum.com/u/vanik)\
**Post date:** [April 27, 2006, 4:03pm UTC](https://www.ruby-forum.com/t/gd2-to-make-charts/58978/2 "2006-04-27T16:03:25Z")

</div>

Have you had a look at Geoffrey Grosenbach’s Gruff Graphs?

[http://nubyonrails.com/pages/gruff](http://nubyonrails.com/pages/gruff)

---

<div class="post-metadata">

**Author:** ![vanik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ac8455/32.png) [@vanik](https://www.ruby-forum.com/u/vanik)\
**Post date:** [April 27, 2006, 4:06pm UTC](https://www.ruby-forum.com/t/gd2-to-make-charts/58978/3 "2006-04-27T16:06:13Z")

</div>

Not sure about GD2, but if you can use ImageMagick/RMagick then the  
gruff  
gem is really cool.

Jeff

---

<div class="post-metadata">

**Author:** ![vanik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ac8455/32.png) [@vanik](https://www.ruby-forum.com/u/vanik)\
**Post date:** [April 27, 2006, 4:19pm UTC](https://www.ruby-forum.com/t/gd2-to-make-charts/58978/4 "2006-04-27T16:19:01Z")

</div>

On Thu, 2006-04-27 at 16:03 +0200, Johnny B wrote:

> Have you had a look at Geoffrey Grosenbach’s Gruff Graphs?
> 
> [http://nubyonrails.com/pages/gruff](http://nubyonrails.com/pages/gruff)

Yup, Gruff is pretty sweet. For some discussion of possible Gruff  
installation pitfalls, see:

[http://tomcopeland.blogs.com/juniordeveloper/2006/02/charts\_and\_grap.html](http://tomcopeland.blogs.com/juniordeveloper/2006/02/charts_and_grap.html)

Yours,

tom

---

<div class="post-metadata">

**Author:** ![vanik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ac8455/32.png) [@vanik](https://www.ruby-forum.com/u/vanik)\
**Post date:** [April 27, 2006, 4:52pm UTC](https://www.ruby-forum.com/t/gd2-to-make-charts/58978/5 "2006-04-27T16:52:55Z")

</div>

I hate Gruff. For very very simple stuff it’s ok, but for anything  
remotely complex i.e. Most statisitcs graphs, its crap

Maybe its because i’m fustrated with the lack of decent graphing tools  
for Ruby. Yeah, i know there are others, but they are a nightmare to  
use.

What i’d do for JFreeChart for ruby…
