From: Patrick Lynch Date: 2006-09-29T04:51:28+09:00 Subject: Re: CanvasPlot, createPlotAxis and createLinePlot. Hidetoshi NAGAI wrote: > From: Patrick Lynch > Subject: Re: CanvasPlot, createPlotAxis and createLinePlot. > Date: Thu, 28 Sep 2006 19:34:06 +0900 > Message-ID: <91de7c204d366491276290198798b3dd@ruby-forum.com> >> >> 2. createLinePlot >> >> 3. createPlotAxis > > Those seem Perl's simple subroutines. > It will be not difficult that you write such methods on Ruby/Tk. > > If you want to create a line item "line" on the canvas "c", > ---------------------------------------------------------------- > line = TkcLine.new(c, <...coords...>, <...options...>) > ---------------------------------------------------------------- > e.g. line = TkcLine.new(c, 0, 0, 10, 5, 20, 30, :fill=>'red') > or > line = TkcLine.new(c, [0, 0, 10, 5, 20, 30], :fill=>'red') > or > line = TkcLine.new(c, [0, 0], [10, 5], [20, 30], :fill=>'red') > or > line = TkcLine.new(c, [[0, 0], [10, 5], [20, 30]], :fill=>'red') > > If you want an arc item, please use TkcArc class. Hi, I've done that...can you tell me how to add tick marks and coordinate values and possibly even coordinate labels? FYI 0----10----20----30----40---... Label: this is the x-axis... a similar thing for the y-axis... THX -- Posted via http://www.ruby-forum.com/.