Skip to content

Commit ad47e80

Browse files
committed
Ensure the same scale is used without resolve scale due to bug
1 parent 62fbf64 commit ad47e80

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

source/inference.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,27 +1122,26 @@ the true sampling distribution—which corresponds to taking many samples fr
11221122
```{code-cell} ipython3
11231123
:tags: [remove-input]
11241124
1125+
sampling_distribution.encoding.x['bin']['extent'] = (90, 250)
11251126
alt.vconcat(
11261127
alt.layer(
11271128
sampling_distribution,
1128-
sampling_distribution.mark_rule(color='#f58518', size=2).encode(x='mean(mean_price)', y=alt.Y()),
1129-
sampling_distribution.mark_text(color='#f58518', size=12, align='left', dx=16, fontWeight='bold').encode(
1129+
alt.Chart(sample_estimates).mark_rule(color='#f58518', size=2).encode(x='mean(mean_price)'),
1130+
alt.Chart(sample_estimates).mark_text(color='#f58518', size=12, align='left', dx=16, fontWeight='bold').encode(
11301131
x='mean(mean_price)',
11311132
y=alt.value(7),
11321133
text=alt.value(f"Mean = {sampling_distribution['data']['mean_price'].mean().round(1)}")
11331134
)
11341135
).properties(title='Sampling distribution', height=150),
11351136
alt.layer(
11361137
boot_est_dist,
1137-
boot_est_dist.mark_rule(color='#f58518', size=2).encode(x='mean(mean_price)', y=alt.Y()),
1138-
boot_est_dist.mark_text(color='#f58518', size=12, align='left', dx=18, fontWeight='bold').encode(
1138+
alt.Chart(boot20000_means).mark_rule(color='#f58518', size=2).encode(x='mean(mean_price)'),
1139+
alt.Chart(boot20000_means).mark_text(color='#f58518', size=12, align='left', dx=18, fontWeight='bold').encode(
11391140
x='mean(mean_price)',
1140-
y=alt.value(6),
1141+
y=alt.value(7),
11411142
text=alt.value(f"Mean = {boot_est_dist['data']['mean_price'].mean().round(1)}")
11421143
)
11431144
).properties(title='Bootstrap distribution', height=150)
1144-
).resolve_scale(
1145-
x='shared'
11461145
)
11471146
```
11481147

0 commit comments

Comments
 (0)