wks=op.find_sheet()
graph = op.new_graph(template='line')
gl=graph[0]
p1 = gl.add_plot(wks, 2, 0)
p2 = gl.add_plot(wks, 3, 0)
#actual usful code starts here
layr = op.GLayer(p2.layer)
pindex = p2.index()
pname = layr.obj.GetStrProp(f'plot{pindex+1}.name')
layr.lt_exec(f'set {pname} -w 5000')
set command first argument is an internal dataset name, which can be obtained from LT by layer.plot2.name$, so once you have that you can execute in the layer context any of those set commands.
CP