# ValueError: left不能大于等于right，但left=0.5, right=0.3

- **ID:** `python/matplotlib-subplots-adjust-error`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

调用plt.subplots_adjust()时参数不一致，left大于等于right，或bottom大于等于top。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.7 | active | — | — |
| 3.8 | active | — | — |

## 解决方案

1. **Ensure left is less than right and bottom less than top** (95% 成功率)
   ```
   plt.subplots_adjust(left=0.1, right=0.9, bottom=0.1, top=0.9)
   ```
2. **Use tight_layout() or constrained_layout instead** (90% 成功率)
   ```
   plt.tight_layout()
   ```

## 无效尝试

- **Using negative values for left and right** — Negative values are allowed but must still satisfy left < right. (70% 失败率)
- **Swapping left and right values** — If left > right, swapping them fixes the error, but the layout may not be intended. (50% 失败率)
