Commit 364416f
committed
fix: show() now displays in a plain Python REPL (#68)
The show=None default keyed off `not hasattr(sys, "ps1")`, which suppressed
plt.show() in any REPL. A plain Python console sets sys.ps1 but leaves
matplotlib non-interactive (unlike Jupyter/IPython), so the figure never
rendered. Decide purely on matplotlib.is_interactive(): interactive backends
auto-render, scripts and plain REPLs need the explicit plt.show().1 parent 227434d commit 364416f
2 files changed
Lines changed: 24 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
1606 | 1605 | | |
1607 | 1606 | | |
1608 | 1607 | | |
1609 | | - | |
1610 | | - | |
1611 | | - | |
1612 | | - | |
1613 | | - | |
1614 | | - | |
1615 | | - | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
1616 | 1613 | | |
1617 | | - | |
| 1614 | + | |
1618 | 1615 | | |
1619 | 1616 | | |
1620 | 1617 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
104 | 122 | | |
105 | 123 | | |
106 | 124 | | |
| |||
0 commit comments