Revision e46344e49680c060a7421a4328d27350cf14d35a authored by Joerg Stelzer on 27 June 2011, 16:10:06 UTC, committed by Joerg Stelzer on 27 June 2011, 16:10:06 UTC

git-svn-id: http://root.cern.ch/svn/root/branches/v5-30-00-patches@40014 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent 5eae153
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