|
148 | 148 | # compute and plot the ROC curve
|
149 | 149 | roc = verification.ROC_curve_init(0.1, n_prob_thrs=10)
|
150 | 150 | verification.ROC_curve_accum(roc, P_f, R_o[-1, :, :])
|
151 |
| -fig = figure() |
152 |
| -verification.plot_ROC(roc, ax=fig.gca(), opt_prob_thr=True) |
153 |
| -title("ROC curve (+ %i min)" % (n_leadtimes * timestep)) |
| 151 | +fig, ax = subplots() |
| 152 | +verification.plot_ROC(roc, ax, opt_prob_thr=True) |
| 153 | +ax.set_title("ROC curve (+ %i min)" % (n_leadtimes * timestep)) |
154 | 154 |
|
155 | 155 | # compute and plot the reliability diagram
|
156 | 156 | reldiag = verification.reldiag_init(0.1)
|
157 | 157 | verification.reldiag_accum(reldiag, P_f, R_o[-1, :, :])
|
158 |
| -fig = figure() |
159 |
| -verification.plot_reldiag(reldiag, ax=fig.gca()) |
160 |
| -title("Reliability diagram (+ %i min)" % (n_leadtimes * timestep)) |
| 158 | +fig, ax = subplots() |
| 159 | +verification.plot_reldiag(reldiag, ax) |
| 160 | +ax.set_title("Reliability diagram (+ %i min)" % (n_leadtimes * timestep)) |
161 | 161 |
|
162 | 162 | # compute and plot the rank histogram
|
163 | 163 | rankhist = verification.rankhist_init(R_f.shape[0], 0.1)
|
164 | 164 | verification.rankhist_accum(rankhist, R_f[:, -1, :, :], R_o[-1, :, :])
|
165 |
| -fig = figure() |
166 |
| -verification.plot_rankhist(rankhist, ax=fig.gca()) |
167 |
| -title("Rank histogram (+ %i min)" % (n_leadtimes * timestep)) |
| 165 | +fig, ax = subplots() |
| 166 | +verification.plot_rankhist(rankhist, ax) |
| 167 | +ax.set_title("Rank histogram (+ %i min)" % (n_leadtimes * timestep)) |
168 | 168 |
|
169 | 169 | # sphinx_gallery_thumbnail_number = 5
|
0 commit comments