nutmeg icon indicating copy to clipboard operation
nutmeg copied to clipboard

Implement special data type classes in Python

Open kitizz opened this issue 10 years ago • 1 comments

Implement classes like Image, Rectangle, Line, etc. This makes the syntax nicer for sending data to Nutmeg.

For example instead of:

fig.append('ax.shapePlot.shapes', {'type': 'rectangle', 'x': 5, 'y': 10, 'width': 50, 'height': 100, 'color': 'red'})

The user can do something like:

rect = Rectangle(5, 10, 50, 100)
rect.color = 'red'
fig.append('ax.shapePlot.shapes', rect)

Related to #40

kitizz avatar Jul 11 '14 04:07 kitizz

Reconsider how this might work with the new API where method invocations are allowed. Things like fig.invoke('ax.shapePlot.createRect', x=5, y=10, width=50, height=100) Might be possible.

kitizz avatar Apr 22 '16 03:04 kitizz