Revision 022486c0898d6a1f04c0ef2d13c0218422ef0b04 authored by Rene Brun on 01 October 2006, 16:53:42 UTC, committed by Rene Brun on 01 October 2006, 16:53:42 UTC
   // if the box has no fill style (ie fill style=0), the box contour is drawn
   // if the box has a fill style, the box contour is not drawn by default.
   // to force the contour to be drawn, specify option "l"


git-svn-id: http://root.cern.ch/svn/root/trunk@16391 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent 3d66a9c
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