Expression painter:setlinewidth(lw) changes the line width of the current pen. Argument lw must be a positive number.
painter:setlinewidth(lw)
lw