# Gruff: How to combine two charts in one image

**URL:** <https://www.ruby-forum.com/t/gruff-how-to-combine-two-charts-in-one-image/75956>\
**Category:** Ruby\
**Created:** [November 14, 2006, 6:41pm UTC](https://www.ruby-forum.com/t/gruff-how-to-combine-two-charts-in-one-image/75956 "2006-11-14T18:41:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![caefer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e36b37/32.png) [@caefer](https://www.ruby-forum.com/u/caefer)\
**Post date:** [November 14, 2006, 6:41pm UTC](https://www.ruby-forum.com/t/gruff-how-to-combine-two-charts-in-one-image/75956/1 "2006-11-14T18:41:26Z")

</div>

Hi Folks,

IÂ´m playing around with gruff and wonder if itÂ´s possible to combine two  
charts in one image. It works with scruffy, take a look:  
[http://scruffy.rubyforge.org](http://scruffy.rubyforge.org)

Because I had some problems with sruffy I want to give it a try with  
gruff. Is it possible anyway?

Thanks in advance,

Christian

---

<div class="post-metadata">

**Author:** ![caefer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e36b37/32.png) [@caefer](https://www.ruby-forum.com/u/caefer)\
**Post date:** [November 14, 2006, 7:27pm UTC](https://www.ruby-forum.com/t/gruff-how-to-combine-two-charts-in-one-image/75956/2 "2006-11-14T19:27:29Z")

</div>

On 11/14/06, Christian S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi Folks,
> 
> I´m playing around with gruff and wonder if it´s possible to combine two  
> charts in one image. It works with scruffy, take a look:  
> [http://scruffy.rubyforge.org](http://scruffy.rubyforge.org)
> 
> Because I had some problems with sruffy I want to give it a try with  
> gruff. Is it possible anyway?

I’m not sure about Gruff supporting it directly, but using RMagick you  
could take the output of the two graphs from Gruff and combine them.  
Maybe not the ideal solution, but I’m sure it would work.

> Thanks in advance,
> 
> Christian
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

HTH,  
MIchael Guterl

---

<div class="post-metadata">

**Author:** ![caefer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e36b37/32.png) [@caefer](https://www.ruby-forum.com/u/caefer)\
**Post date:** [November 14, 2006, 7:46pm UTC](https://www.ruby-forum.com/t/gruff-how-to-combine-two-charts-in-one-image/75956/3 "2006-11-14T19:46:44Z")

</div>

Michael G. wrote:

> I’m not sure about Gruff supporting it directly, but using RMagick you  
> could take the output of the two graphs from Gruff and combine them.  
> Maybe not the ideal solution, but I’m sure it would work.  
> Hmm, sounds complicate. Could you provide an example?

Thanks & Regards,

Christian
