Beginners > BASIC functions

How to plot results from the cells separately

(1/1)

Karat:
Hi all,
I have a solution spread that consists of, let's say, 20 solutions. I want to make one plot that contains results from solutions 1-10 and another plot that has results from solutions 11-20. How do I do that using USER_GRAPH?

Thank you in advance,
Karat

dlparkhurst:
This script is a little different because the forum does not maintain the tabs of SOLUTION_SPREAD, but you get the idea.


--- Code: ---SOLUTION 1-20
END
RUN_CELLS
-cells 1-20
USER_GRAPH 1
    -axis_titles            "Cell number" "pH" ""
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 IF (cell_no > 10) THEN GOTO 100
20 GRAPH_X cell_no
30 GRAPH_Y -LA("H+")
100 END
  -end
    -active                 true
USER_GRAPH 2
    -axis_titles            "Cell number" "pH" ""
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
10 IF (cell_no < 11) THEN GOTO 100
20 GRAPH_X cell_no
30 GRAPH_Y -LA("H+")
100 END
END

--- End code ---

Karat:
Thank you so much, David!
It is clear now:)

Navigation

[0] Message Index

Go to full version