Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Commitc9464aa
committed
FIX: be more careful about not importing pyplot early
In matplotlib.use we import pyplot to use `switch_backend`, howeverif the user calls `mpl.use(...)` before importing pyplot thenduring the initial import of pyplot, before we set the selectedbackend we try to set the backend set via rcParams.This change only imports pyplot if it is already imported, otherwiseit is safe to just set the rcParams and not go through the full`plt.switch_backend` path.closes#177631 parent4a143b9 commitc9464aa
1 file changed
+24
-6
lines changedLines changed: 24 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1136 | 1136 |
| |
1137 | 1137 |
| |
1138 | 1138 |
| |
| 1139 | + | |
| 1140 | + | |
1139 | 1141 |
| |
1140 | 1142 |
| |
1141 | 1143 |
| |
1142 | 1144 |
| |
1143 |
| - | |
1144 |
| - | |
1145 |
| - | |
1146 |
| - | |
1147 |
| - | |
1148 |
| - | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
1149 | 1167 |
| |
1150 | 1168 |
| |
1151 | 1169 |
| |
|
0 commit comments
Comments
(0)