From: Patrick Lynch Date: 2006-09-29T19:33:31+09:00 Subject: Re: CanvasPlot, createPlotAxis and createLinePlot. Hidetoshi NAGAI wrote: > > It seems that the package is constructed with standard canvas items > only. > Why don't you translate it to Ruby/Tk? ;-) > Anyway, translation is not so difficult, if you can read the Perl > source. > For example, > ------------------------------------------------------ > if ($y_axis) { > $self->createText( > $x1-$tl, $y2-$x, -text => $l, > %args, -fill => $tcolor, > -font => $lfont, -anchor => $an, > ); > } else { > $self->createText( > $x+$x1, $y1+$tl, -text => $l, > %args, -fill => $tcolor, > -font => $tfont, -anchor => $an, > ); > } > --------------------------------------------------------------- > ------------------------------------------------------ > if (y_axis) { > TkcText.new(self, x1-tl, y2-x, > args.merge(:text=>l, :fill=>tcolor, > :font=>lfont, :anchor=>an) > ) > } else { > TkcText.new(self, x+x1, y1+tl, > args.merge(:text=>l, :fill=>tcolor, > :font=>tfont, :anchor=>an) > ) > } > --------------------------------------------------------------- > > However, if you want to create beautiful graphs, > I recommend you to use BLT ( or Tcllib(Tklib) ) extension. > Current Ruby/Tk has a binding for BLT ( and Tcllib(Tklib) ). Hidetoshi, Thank you, I shall try both techniques... I'm developing a Quality Assurance Metrics package...so I will need do do some beautiful graphs... When its done, I will dedicate the graphics portion to you. Ciao, Pat -- Posted via http://www.ruby-forum.com/.