adelhpour / SBMLNetwork

SBMLNetwork is a library designed to enable software developers and systems biologists to interact with the graphical representation of SBML (Systems Biology Markup Language) models.
MIT License
0 stars 2 forks source link

No means to make a gradient #86

Closed hsauro closed 1 month ago

hsauro commented 1 month ago

There is currently no way to make a gradient to use on a for example a nodel

adelhpour commented 1 month ago

With merging PR #96, it is now possible to set the fill color of network elements with a gradient. Here is a simple example of its demonstration:

import tellurium as te
import sbmlnetwork as sbmln

r = te.loada('''
S1 -> S2;
 ''')

network = sbmln.load(r.getSBML())
network.setFillColorAsGradient("S1", stop_colors=["blue", "red"], stop_offsets=[0, 100])
network.draw()