Commit 44bfd28
committed
WiP: Switch to using display() to show the plots
This should ensure better compatibility with the Julia package
ecosystem. Now, if Gnuplot.jl is used in an environment capable of
showing multimedia content (IJulia, VS Code, Pluto), this will take
precedence over using gnuplot's built-in viewer. In the REPL, gnuplot
viewer is used by default.
In VS Code, for example, when the "Use Plot Pane" settings is enabled,
the plots show in that pane, but when it is disabled, gnuplot viewer
is automatically used.
For people who prefer to always use the gnuplot viewer, they can
achieve that by running:
popdisplay(Gnuplot.GnuplotDisplay())
pushdisplay(Gnuplot.GnuplotDisplay())
This ensures that the gnuplot display has the highest priority.
However, note that VSCode ensures that its VSCodeDisplay is always the
last and IJulia also ignores this.
On the other hand, to disable the gnuplot viewer, one can run:
Gnuplot.option.gpviewer = false
What was tested:
- [x] Plotting from REPL
- [x] VS Code
- [x] With Plot Pane enabled
- [x] With Plot Pane disabled
- [x] IJulia
- [x] Gnuplot.jl test suite
- [ ] DrySessions
- [x] Pluto
- [ ] Juno
- [ ] Weave.jl1 parent 04484ad commit 44bfd28
2 files changed
Lines changed: 48 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
| |||
583 | 584 | | |
584 | 585 | | |
585 | 586 | | |
586 | | - | |
587 | 587 | | |
| 588 | + | |
588 | 589 | | |
589 | 590 | | |
590 | 591 | | |
| |||
767 | 768 | | |
768 | 769 | | |
769 | 770 | | |
770 | | - | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
771 | 774 | | |
772 | 775 | | |
773 | 776 | | |
| |||
784 | 787 | | |
785 | 788 | | |
786 | 789 | | |
787 | | - | |
| 790 | + | |
788 | 791 | | |
789 | 792 | | |
790 | 793 | | |
| |||
1332 | 1335 | | |
1333 | 1336 | | |
1334 | 1337 | | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | 1338 | | |
1339 | 1339 | | |
1340 | 1340 | | |
| |||
1547 | 1547 | | |
1548 | 1548 | | |
1549 | 1549 | | |
1550 | | - | |
| 1550 | + | |
1551 | 1551 | | |
1552 | 1552 | | |
1553 | 1553 | | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
1554 | 1567 | | |
1555 | 1568 | | |
1556 | 1569 | | |
| |||
1560 | 1573 | | |
1561 | 1574 | | |
1562 | 1575 | | |
1563 | | - | |
| 1576 | + | |
1564 | 1577 | | |
1565 | 1578 | | |
1566 | 1579 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
113 | 131 | | |
114 | 132 | | |
115 | 133 | | |
| |||
0 commit comments