|
1091 | 1091 | "Note: This works best if the in and out columns are aligned, such that ``STO-SY_IN`` and ``STO-SY_OUT`` are both colored orange, for example." |
1092 | 1092 | ] |
1093 | 1093 | }, |
| 1094 | + { |
| 1095 | + "cell_type": "code", |
| 1096 | + "execution_count": null, |
| 1097 | + "metadata": {}, |
| 1098 | + "outputs": [], |
| 1099 | + "source": [ |
| 1100 | + "flux" |
| 1101 | + ] |
| 1102 | + }, |
1094 | 1103 | { |
1095 | 1104 | "cell_type": "code", |
1096 | 1105 | "execution_count": null, |
|
1100 | 1109 | "fig, ax = plt.subplots(figsize=(10, 5))\n", |
1101 | 1110 | "in_cols = ['STO-SS_IN', 'STO-SY_IN', 'WEL_IN', 'RCHA_IN', 'CHD_IN', 'SFR_IN', 'LAK_IN']\n", |
1102 | 1111 | "out_cols = [c.replace('_IN', '_OUT') for c in in_cols]\n", |
| 1112 | + "flux = flux.asfreq('ME')\n", |
1103 | 1113 | "flux[in_cols].plot.bar(stacked=True, ax=ax)\n", |
1104 | 1114 | "(-flux[out_cols]).plot.bar(stacked=True, ax=ax)\n", |
1105 | 1115 | "ax.legend(loc='lower left', bbox_to_anchor=(1, 0))\n", |
|
1117 | 1127 | "\n", |
1118 | 1128 | "Fienen, M. N., Haserodt, M. J., and Leaf, A. T. (2021). MODFLOW models used to simulate groundwater flow in the Wisconsin Central Sands Study Area, 2012-2018. New York: U.S. Geological Survey Data Release. doi:10.5066/P9BVFSGJ" |
1119 | 1129 | ] |
1120 | | - }, |
1121 | | - { |
1122 | | - "cell_type": "code", |
1123 | | - "execution_count": null, |
1124 | | - "metadata": {}, |
1125 | | - "outputs": [], |
1126 | | - "source": [] |
1127 | 1130 | } |
1128 | 1131 | ], |
1129 | 1132 | "metadata": { |
1130 | 1133 | "kernelspec": { |
1131 | 1134 | "display_name": "pyclass", |
1132 | 1135 | "language": "python", |
1133 | 1136 | "name": "python3" |
1134 | | - }, |
1135 | | - "language_info": { |
1136 | | - "codemirror_mode": { |
1137 | | - "name": "ipython", |
1138 | | - "version": 3 |
1139 | | - }, |
1140 | | - "file_extension": ".py", |
1141 | | - "mimetype": "text/x-python", |
1142 | | - "name": "python", |
1143 | | - "nbconvert_exporter": "python", |
1144 | | - "pygments_lexer": "ipython3", |
1145 | | - "version": "3.12.11" |
1146 | 1137 | } |
1147 | 1138 | }, |
1148 | 1139 | "nbformat": 4, |
|
0 commit comments