# How to draw a large chart?

**URL:** <https://www.ruby-forum.com/t/how-to-draw-a-large-chart/155468>\
**Category:** Rails\
**Created:** [December 12, 2008, 4:37am UTC](https://www.ruby-forum.com/t/how-to-draw-a-large-chart/155468 "2008-12-12T04:37:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![takkeeeeee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e36b37/32.png) [@takkeeeeee](https://www.ruby-forum.com/u/takkeeeeee)\
**Post date:** [December 12, 2008, 4:37am UTC](https://www.ruby-forum.com/t/how-to-draw-a-large-chart/155468/1 "2008-12-12T04:37:16Z")

</div>

I am meeting a big problem with charts.

I have to display a horizontal bar chart with ~3000 bars in ~5s. Assume  
the input data are ready in the needed format.

I have tested open flash chart, gruff, scruffy… They all failed. With  
1000 bars, open flash chart took 15-20s. Gruff and scruffy were worse.

Do you have any ideas?

---

<div class="post-metadata">

**Author:** ![takkeeeeee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e36b37/32.png) [@takkeeeeee](https://www.ruby-forum.com/u/takkeeeeee)\
**Post date:** [December 12, 2008, 5:31am UTC](https://www.ruby-forum.com/t/how-to-draw-a-large-chart/155468/2 "2008-12-12T05:31:21Z")

</div>

> Do you have any ideas?  
> Sub the work out to gnuplot and have it generate the image maybe…

-philip

---

<div class="post-metadata">

**Author:** ![takkeeeeee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e36b37/32.png) [@takkeeeeee](https://www.ruby-forum.com/u/takkeeeeee)\
**Post date:** [December 12, 2008, 4:07pm UTC](https://www.ruby-forum.com/t/how-to-draw-a-large-chart/155468/3 "2008-12-12T16:07:08Z")

</div>

> > I have tested open flash chart, gruff, scruffy… They all failed.  
> > With  
> > 1000 bars, open flash chart took 15-20s. Gruff and scruffy were worse.

> Sub the work out to gnuplot and have it generate the image maybe…

Indeed: GnuPlot is the oldest and most professional of those plotters  
(some of  
which are only on the list because they got good press!).

Contrarily, GnuPlot is often very cranky to use and poorly documented.  
Too many  
features!

I wrote up how to use GnuPlot for log charts here:

[O'Reilly Media - Technology and Business Training](http://www.oreillynet.com/ruby/blog/2008/03/cruisecontrol_charts.html)

Next, I would not inflict 1 000 bars on my uses. Could you find a way to  
cut the  
data down to useful segments? That’s why I used log charts, for example!

–  
Phlip

---

<div class="post-metadata">

**Author:** ![takkeeeeee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e36b37/32.png) [@takkeeeeee](https://www.ruby-forum.com/u/takkeeeeee)\
**Post date:** [December 15, 2008, 4:39am UTC](https://www.ruby-forum.com/t/how-to-draw-a-large-chart/155468/4 "2008-12-15T04:39:49Z")

</div>

Khiet Bui wrote:

> Thanks, man! I will try it.
> 
> If it is okie, i will feedback 🙂

But, how to draw a horizontal bar chart on gnuplot?

---

<div class="post-metadata">

**Author:** ![takkeeeeee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e36b37/32.png) [@takkeeeeee](https://www.ruby-forum.com/u/takkeeeeee)\
**Post date:** [December 15, 2008, 2:36am UTC](https://www.ruby-forum.com/t/how-to-draw-a-large-chart/155468/5 "2008-12-15T02:36:53Z")

</div>

Thanks, man! I will try it.

If it is okie, i will feedback 🙂
