# Annotating Graphs cleanly

**URL:** <https://www.ruby-forum.com/t/annotating-graphs-cleanly/168614>\
**Category:** Rails\
**Created:** [May 22, 2009, 10:09pm UTC](https://www.ruby-forum.com/t/annotating-graphs-cleanly/168614 "2009-05-22T22:09:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arvliet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ee59a6/32.png) [@arvliet](https://www.ruby-forum.com/u/arvliet)\
**Post date:** [May 22, 2009, 10:09pm UTC](https://www.ruby-forum.com/t/annotating-graphs-cleanly/168614/1 "2009-05-22T22:09:34Z")

</div>

Hello!

I am working on an application where I need to annotate graphs I  
generate in such a way that each point is labelled with a small bit of  
text.

For instance, my point may be drawn as (12, 100), but I need a label  
on that point thats a brief line of text, such as “New membership mail  
drop”.

I’ve looked at a few libraries, like Gruff, but they do not do this  
for me, so I am working on it myself using RMagick.

My question, before I get too deep into codin’:  
Anyone know of a library that does that? The big deal part is getting  
the text on the image, and not overlapping. If you have 2 points  
about the same level, the text1 may overlap on text2.

I am hoping someone has seen a library, or algorithm that can help jog  
the labels around so they don’t overlap.

Thanks.

~A
