;title and axes labels
di=createdisplay(1, 1)
x=1:100
y=sqrt(x)
data=x~y
show(di, 1, 1, data)
setgopt(di,1,1,"title","Plot of Sqrt(x)","xlabel","x","ylabel","y=sqrt(x)")
; varying xoffset and yoffset
library("xplore")
n = 100
s1 = 1
s2 = 1
rho = 0.3
ss = #(s1,rho)~#(rho,s2)
u = gennorm(n, #(0,0), ss) ; gen 2 dim normal data
d=createdisplay (2,2)
show (d,1,1,u)
setgopt (d,1,1,"title","very small offset","xlim",-4|4,"ylim",-4|4,"yoffset", 5|5, "xoffset", 5|5)
show (d,1,2,u)
setgopt (d,1,2,"title","small offset","xlim",-4|4,"ylim",-4|4,"yoffset", 10|10, "xoffset", 10|10)
show(d,2,1,u)
setgopt (d,2,1,"title","large offset ","xlim",-4|4,"ylim",-4|4,"yoffset", 15|15, "xoffset", 15|15)
show(d,2,2,u)
setgopt(d,2,2,"title","very large offset","xlim",-4|4,"ylim",-4|4,"yoffset", 20|20, "xoffset", 20|20)
;lmits, majors and offsets
di=createdisplay(2, 2)
y=sin(x/20)+uniform(100, 1)/10
show(di, 1, 1, x~y)
show(di, 1, 2, x~y)
show(di, 2, 1, x~y)
show(di, 2, 2, x~y)
setgopt(di, 1, 1,"title","default")
setgopt(di, 1, 2,"title","ylim = (-4) | 4, xlim = 0 | 50", "ylim", (-4)|4,"xlim", 0|50)
setgopt(di, 2, 1,"title","ymajor = 0.3, xmajor = 15","ymajor", 0.3,"xmajor", 15)
setgopt(di, 2, 2,"title","yoffset = 13 | 13, xoffset = 20 | 20", "yoffset", 13|13,"xoffset", 20|20)