Skip to content

Commit

Permalink
add GAA to tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
yoelcortes committed Nov 13, 2024
1 parent 07705ec commit 31a36ea
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion How2STEAM
13 changes: 11 additions & 2 deletions biosteam/plots/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,7 @@ def plot_contour_single_metric(
"Z.shape must be (X, Y, M, N), where (X, Y) is the shape of both X and Y"
)
fig, axes, ax_colorbar = contour_subplots(nrows, ncols, single_colorbar=True)
if styleaxiskw is None: styleaxiskw = {}
if styleaxiskw is None: styleaxiskw = dict(xtick0=False, ytick0=False)
cps = np.zeros([nrows, ncols], dtype=object)
linecolor = np.array([*c.neutral_shade.RGBn, 0.1])
other_axes = []
Expand Down Expand Up @@ -1207,7 +1207,16 @@ def plot_contour_single_metric(
)
for i in clabels: i.set_rotation(0)
cps[row, col] = cp
dct = style_axis(ax, xticks, yticks, xticklabels, yticklabels, **styleaxiskw)

if row == nrows - 1 and not styleaxiskw.get('ytick0', True):
sak = styleaxiskw.copy()
sak['ytick0'] = True
else:
sak = styleaxiskw
if col == 0 and not styleaxiskw.get('xtick0', True):
sak = sak.copy()
sak['xtick0'] = True
dct = style_axis(ax, xticks, yticks, xticklabels, yticklabels, **sak)
other_axes.append(dct)
cb = metric_bar.colorbar(fig, ax_colorbar, cp, fraction=0.5)
plt.sca(ax_colorbar)
Expand Down
6 changes: 6 additions & 0 deletions docs/tutorial/Glacial_acetic_acid_separation.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"path": "../../How2STEAM/case_studies/Glacial_acetic_acid_separation.ipynb",
"extra-media": [
"../../How2STEAM/images/GAA.png"
]
}
2 changes: 1 addition & 1 deletion docs/tutorial/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ User guide
:caption: Case studies

Aerated_bioreactor_design

Glacial_acetic_acid_separation

0 comments on commit 31a36ea

Please sign in to comment.