Production envelopes (aka phenotype phase planes) will show distinct phases of optimal growth with different use of two different substrates. For more information, see Edwards et al.

Cobrapy supports calculating these production envelopes and they can easily be plotted using your favorite plotting package. Here, we will make one for the "textbook" *E. coli* core model and demonstrate plotting using matplotlib.

```
In [1]:
```import cobra.test
from cobra.flux_analysis import production_envelope
model = cobra.test.create_test_model("textbook")

We want to make a phenotype phase plane to evaluate uptakes of Glucose and Oxygen.

```
In [2]:
```prod_env = production_envelope(model, ["EX_glc__D_e", "EX_o2_e"])

```
In [3]:
```prod_env.head()

```
Out[3]:
```

```
In [4]:
```prod_env = production_envelope(
model, ["EX_o2_e"], objective="EX_ac_e", carbon_sources="EX_glc__D_e")

```
In [5]:
```prod_env.head()

```
Out[5]:
```

```
In [6]:
```%matplotlib inline

```
In [7]:
```prod_env.plot(
kind='line', x='EX_o2_e', y='carbon_yield_maximum');

```
```