More python functions on graph layer like add_label()


Version: 2025

Type: Features

Category: Programming

Subcategory: Python

Jira: ORG-29844


Example:

import originpro as op
gp = op.new_graph()
gl = gp[0]
#add a text label
text = gl.add_label("hello")
text.set_float('x', 2.5)
text.text = 'world'

#add a line
line = gl.add_line(5, 5, 9, 8)
line.width = 5
line.set_int('arrowendshape', 2)