Revision 6bef5d95c9c192b6cb1ddcb0cc19ca28e897739d authored by Rene Brun on 06 April 2005, 15:56:14 UTC, committed by Rene Brun on 06 April 2005, 15:56:14 UTC
Template implementation should be in header files (especially when the
template class contains a ClassDef).


git-svn-id: http://root.cern.ch/svn/root/trunk@11511 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent 854d6f8
Raw File
canvas.rb

# ruby-root testsuite
#
# A simple canvas demostration script.
#
# 15/12/2003    --elathan

tc = TCanvas.new("tc", "canvas example", 200, 10, 700, 500)

tc.SetFillColor(42)
tc.SetGrid

x = Array.new
y = Array.new

for i in 0..19 do
    x[i] = i*0.1
    y[i] = 10*Math.sin(x[i] + 0.2)
end

tg = TGraph.new(20, x, y)
tg.SetLineColor(2)
tg.SetLineWidth(4)
tg.SetMarkerColor(4)
tg.SetMarkerStyle(21)
tg.Draw("ACP")

tc.Update
tc.GetFrame.SetFillColor(21)
tc.GetFrame.SetBorderSize(12)
tc.Modified
gApplication.Run
back to top