Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ncols not working quite right in plotTimeSeriesSens #1042

Open
hsauro opened this issue Aug 1, 2022 · 1 comment
Open

ncols not working quite right in plotTimeSeriesSens #1042

hsauro opened this issue Aug 1, 2022 · 1 comment
Assignees
Labels

Comments

@hsauro
Copy link

hsauro commented Aug 1, 2022

import tellurium as te
import roadrunner

r = te.loada ('''
     $Xo -> S1; k1*Xo;
      S1 -> S2; k2*S1;
      S2 ->; k3*S2; 
      Xo = 4; k1 = 0.5; k2 = 0.23; k3 = 0.56             
''')
sensSolver = r.getSensitivitySolver()
time, sens, rownames, colnames = r.timeSeriesSensitivities(0, 10, 11)

# This works:
#roadrunner.plotTimeSeriesSens(time, sens, rownames, colnames, ncol=2)

# This doesn't work
roadrunner.plotTimeSeriesSens(time, sens, rownames, colnames, ncol=1)

  roadrunner.plotTimeSeriesSens(time, sens, rownames, colnames, ncol=1)

  File "C:\Tellurium-Winpython-3.8\python-3.8.6.amd64\lib\site-packages\roadrunner\roadrunner.py", line 7354, in plotTimeSeriesSens
    ax[i, j].plot(time, df[(species, param)].to_numpy(), label=f"{species}:{param}")

IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
@luciansmith
Copy link

The immediate problem was fixed with #1049.

However, the output produced is now:

image

The Y axes are all different, I guess? And overlaid on top of one another? This seems like another bug, or some sort of problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants