Closed hsauro closed 2 years ago
In this image we can see the reaction line underneath node S2, a user shouldn't be able to see the line.
import SBMLDiagrams as sd
import tellurium as te
r = te.loada (''' J1: S1 -> S2 + S3; k1S1; J2: S3 -> S4; k2S3; J3: S4 -> S5; k3*S4; S1 = 10; S2 = 0; S3 = 0; S4 = 0; k1 = 0.1; k2 = 0.2; k3 = 0.45 ''')
la = sd.load (r.getSBML())
la.setNodeAndTextPosition('S1', [200, 200]) la.setNodeAndTextPosition('S2', [300, 260]) la.setNodeAndTextPosition('S3', [400, 200]) la.setNodeAndTextPosition('S4', [500, 200]) la.setNodeAndTextPosition('S5', [600, 200]) la.setReactionDefaultCenterAndHandlePositions('J1') la.setReactionDefaultCenterAndHandlePositions('J2') la.setReactionDefaultCenterAndHandlePositions('J3') la.plot()
Another example of a visible line between S3 and S4, also no arrow shown.
m = r.simulate (0, 50, 200) r.plot()
la.setNodeAndTextPosition('S1', [200, 200]) la.setNodeAndTextPosition('S2', [345, 280]) la.setNodeAndTextPosition('S3', [480, 200]) la.setNodeAndTextPosition('S4', [600, 200]) la.setNodeAndTextPosition('S5', [740, 200]) la.setReactionDefaultCenterAndHandlePositions('J1') la.setReactionDefaultCenterAndHandlePositions('J2') la.setReactionDefaultCenterAndHandlePositions('J3') la.plot()
fixed the bug. pls see a similar example on github (https://github.com/SunnyXu/SBMLDiagrams/tree/main/examples/Basic_functions).
In this image we can see the reaction line underneath node S2, a user shouldn't be able to see the line.
import SBMLDiagrams as sd
import tellurium as te
r = te.loada (''' J1: S1 -> S2 + S3; k1S1; J2: S3 -> S4; k2S3;
J3: S4 -> S5; k3*S4; S1 = 10; S2 = 0; S3 = 0; S4 = 0; k1 = 0.1; k2 = 0.2; k3 = 0.45 ''')
la = sd.load (r.getSBML())
la.setNodeAndTextPosition('S1', [200, 200]) la.setNodeAndTextPosition('S2', [300, 260]) la.setNodeAndTextPosition('S3', [400, 200]) la.setNodeAndTextPosition('S4', [500, 200]) la.setNodeAndTextPosition('S5', [600, 200]) la.setReactionDefaultCenterAndHandlePositions('J1') la.setReactionDefaultCenterAndHandlePositions('J2') la.setReactionDefaultCenterAndHandlePositions('J3') la.plot()
Another example of a visible line between S3 and S4, also no arrow shown.
import SBMLDiagrams as sd
import tellurium as te
r = te.loada (''' J1: S1 -> S2 + S3; k1S1; J2: S3 -> S4; k2S3;
J3: S4 -> S5; k3*S4; S1 = 10; S2 = 0; S3 = 0; S4 = 0; k1 = 0.1; k2 = 0.2; k3 = 0.45 ''')
m = r.simulate (0, 50, 200) r.plot()
la = sd.load (r.getSBML())
la.setNodeAndTextPosition('S1', [200, 200]) la.setNodeAndTextPosition('S2', [345, 280]) la.setNodeAndTextPosition('S3', [480, 200]) la.setNodeAndTextPosition('S4', [600, 200]) la.setNodeAndTextPosition('S5', [740, 200]) la.setReactionDefaultCenterAndHandlePositions('J1') la.setReactionDefaultCenterAndHandlePositions('J2') la.setReactionDefaultCenterAndHandlePositions('J3') la.plot()