# ValueError: Unknown projection '3d'

- **ID:** `python/matplotlib-3d-proj-not-registered`
- **Domain:** python
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Using add_subplot(projection='3d') without importing mpl_toolkits.mplot3d, so the projection is not registered.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (96% success)
   ```
   import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D  # noqa: F401
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
   ```
2. **** (93% success)
   ```
   import matplotlib.pyplot as plt
ax = plt.axes(projection='3d')
ax.plot3D([0,1,2], [0,1,2], [0,1,2])
   ```

## Dead Ends

- **** — mpl_toolkits ships with matplotlib; installing it separately is unnecessary and may cause version conflicts. (90% fail)
- **** — Matplotlib projection names are case-sensitive; '3D' is not registered either. (85% fail)
