# A 2Dgraphics alike lib for ruby?

**URL:** <https://www.ruby-forum.com/t/a-2dgraphics-alike-lib-for-ruby/82385>\
**Category:** Ruby\
**Created:** [January 19, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/a-2dgraphics-alike-lib-for-ruby/82385 "2007-01-19T16:30:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![honte](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a698b9/32.png) [@honte](https://www.ruby-forum.com/u/honte)\
**Post date:** [January 19, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/a-2dgraphics-alike-lib-for-ruby/82385/1 "2007-01-19T16:30:01Z")

</div>

all in subject ☹ … i’ve seen stuff like tioga (linux) or gnuplot, but  
i’d like something like 2Dgraphics on java… I am new to ruby, so any  
suggestion welcome, thank you in advance.

---

<div class="post-metadata">

**Author:** ![honte](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a698b9/32.png) [@honte](https://www.ruby-forum.com/u/honte)\
**Post date:** [January 19, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/a-2dgraphics-alike-lib-for-ruby/82385/2 "2007-01-19T16:30:06Z")

</div>

honte wrote:

> all in subject ☹ … i’ve seen stuff like tioga (linux) or gnuplot, but  
> i’d like something like 2Dgraphics on java… I am new to ruby, so any  
> suggestion welcome, thank you in advance.

There’s the TkCanvas widget, which you can use through Ruby’s Tk  
binding. It’s included in the one-click installer and other ruby  
interpreter packages.

---

<div class="post-metadata">

**Author:** ![honte](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a698b9/32.png) [@honte](https://www.ruby-forum.com/u/honte)\
**Post date:** [January 19, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/a-2dgraphics-alike-lib-for-ruby/82385/3 "2007-01-19T16:30:17Z")

</div>

honte wrote:

> i’ve seen stuff like tioga (linux) or gnuplot, but  
> i’d like something like 2Dgraphics on java.

RMagick gives you a drawing API into an in-memory image,  
which you can save to a file in numerous formats. You can  
also access the pixel array and map them to a Pixbuf to  
display in a ruby-gtk application. This approach might be  
more suitable than TkCanvas if your main goal is to generate  
image files (rather than display images).

Clifford H…
