Scaling Templates
Goal: Learn how to scale templates in CDAT.
You can manipulate the template by chaging plot's ratio (changing it's aspect ratio), scaling it or moving.
x=vcs.init()
t=x.createtemplate(‘new’)
Changing template's ratio
# make y twice as big as x
x.ratio=2
# return to automatic default ratio
x.ratio=‘auto’
# move also tick marks
x.ratio=‘2t’
Scaling the template
# half size
t.scale(.5)
#half size in X, font unchanged
t.scale(.5, axis=‘x’)
# also alter fonts
t.scale(.5, axis=‘x’, font=1)
Moveing the template
# move by 20% in x, 40% in y
t.move(.2, .4)
# Positive values means up/right
# move lower left corner of data to x,y
t.moveto(x,y)