# TypeError: 'ticks' must be a sequence of numbers or None, got <class 'list'> of strings.

- **ID:** `python/matplotlib-colorbar-ticks-error`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Passing string labels directly to the ticks parameter of colorbar(), which expects numeric positions.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |

## Workarounds

1. **Set numeric tick positions and then set tick labels separately** (95% success)
   ```
   cbar = plt.colorbar(); cbar.set_ticks([0, 0.5, 1]); cbar.set_ticklabels(['low', 'mid', 'high'])
   ```
2. **Use the format parameter for simple formatting** (90% success)
   ```
   cbar = plt.colorbar(ticks=[0, 0.5, 1], format='%.2f')
   ```

## Dead Ends

- **Using a list of integers but with non-monotonic order** — Ticks must be monotonic; non-monotonic values may work but cause visual issues. (60% fail)
- **Setting tick labels without setting tick positions** — The error is about the ticks argument; positions must be numeric. (80% fail)
