# TypeError: 'bins' must be an integer, a sequence of scalars, or a string, not <class 'list'> of strings.

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

## Root Cause

Passing a list of strings as bins to plt.hist(), which expects numeric bins or a single string method (like 'auto', 'fd').

## Version Compatibility

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

## Workarounds

1. **Use an integer for the number of bins** (95% success)
   ```
   plt.hist(data, bins=20)
   ```
2. **Use a sequence of bin edges as numbers** (90% success)
   ```
   plt.hist(data, bins=[0, 10, 20, 30])
   ```

## Dead Ends

- **Using a list of integers but with mixed types** — Bins must be numeric; mixed types cause conversion errors. (80% fail)
- **Passing a single string like 'auto' but in a list** — A list of one string is still a list, not a valid bins argument. (90% fail)
