Skip to content

Commit cf17f13

Browse files
dshkolclaude
andcommitted
Fix tutorial visualizations by removing plt.show() calls
Problem: MyST-NB notebooks weren't displaying matplotlib plots Cause: plt.show() closes figures before MyST-NB can capture them Solution: Remove all plt.show() calls - figures auto-display in notebooks Changes to docs/tutorials/working_with_geometry.md: - Removed 4 plt.show() calls throughout tutorial - Plots now render correctly in MyST-NB documentation - Verified locally: 3 images now display (previously 0) Generated visualizations: - Population choropleth map by municipality - Side-by-side population vs income comparison maps - Municipal boundary map 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 09afd21 commit cf17f13

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

docs/tutorials/working_with_geometry.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ ax.set_title('Population by Municipality\nVancouver CMA, 2021', fontsize=16)
129129
ax.axis('off') # Remove axes for cleaner look
130130
131131
plt.tight_layout()
132-
plt.show()
133132
```
134133

135134
## Multi-Variable Mapping
@@ -167,7 +166,6 @@ ax2.axis('off')
167166
168167
plt.suptitle('Vancouver CMA: Population vs Income', fontsize=16, y=1.02)
169168
plt.tight_layout()
170-
plt.show()
171169
```
172170

173171
## Working with Different Geographic Levels
@@ -228,7 +226,6 @@ try:
228226
boundaries.plot(ax=ax, edgecolor='blue', facecolor='lightblue', alpha=0.7)
229227
ax.set_title('Vancouver CMA Municipal Boundaries')
230228
ax.axis('off')
231-
plt.show()
232229
233230
except Exception as e:
234231
print(f"Error getting boundaries: {e}")
@@ -238,7 +235,6 @@ except Exception as e:
238235
vancouver_data.boundary.plot(ax=ax, color='blue', linewidth=2)
239236
ax.set_title('Sample Municipal Boundaries')
240237
ax.axis('off')
241-
plt.show()
242238
```
243239

244240
## Spatial Analysis

0 commit comments

Comments
 (0)