You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This brings 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), their internal viewer
will take precedence over using gnuplot's built-in viewer. In the
REPL, gnuplot viewer is still 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 set
Gnuplot.options.gpviewer to true. This should result in the same
behaviour as before this commit.
The display behaviour of **Gnuplot.jl** depends on the value of the `Gnuplot.options.gpviewer` flag:
15
15
16
-
- if `true` the plot is displayed in a gnuplot window, using one of the interactive terminals such as `wxt`, `qt` or `aqua`. This is the default setting when running a Julia REPL session; The terminal options can be customized using `Gnuplot.options.term`;
17
-
18
-
- if `false` the plot is displayed through the Julia [multimedia interface](https://docs.julialang.org/en/v1/base/io-network/#Multimedia-I/O-1), i.e. it is exported as either a `png`, `svg` or `html` file, and displayed in an external viewer. This is the default setting when running a Jupyter, JupyterLab or Juno session. The terminal options can be customized using the `Gnuplot.options.mime` dictionary.
19
-
20
-
The `Gnuplot.options.gpviewer` flag is automatically set when the package is first loaded according to the runtime environment, however the user can change its value at any time to fit specific needs. Further informations and examples for both options are available in this Jupyter [notebook](https://github.com/gcalderone/Gnuplot.jl/blob/gh-pages/v1.3.0/options/display.ipynb).
16
+
- if `false` (the default) the plot is displayed through the Julia [multimedia interface](https://docs.julialang.org/en/v1/base/io-network/#Multimedia-I/O-1), i.e. depending on the current environment, it is displayed either in a gnuplot window (REPL) or exported as either a `png`, `svg` or `html` file, and displayed in an external viewer (IDE, notebook). The terminal options for the gnuplot window can be customized using `Gnuplot.options.term`; options for exporting can be customized using the `Gnuplot.options.mime` dictionary.
21
17
18
+
- if `true` the plot is always displayed in a gnuplot window, using one of the interactive terminals such as `wxt`, `qt` or `aqua`. The terminal options can be customized using `Gnuplot.options.term`;
22
19
20
+
Further information and examples for both options are available in this Jupyter [notebook](https://github.com/gcalderone/Gnuplot.jl/blob/gh-pages/v1.3.0/options/display.ipynb).
Copy file name to clipboardExpand all lines: src/Gnuplot.jl
+39-24
Original file line number
Diff line number
Diff line change
@@ -202,7 +202,7 @@ Structure containing the package global options, accessible through `Gnuplot.opt
202
202
- `default::Symbol`: default session name (default: `:default`)
203
203
- `term::String`: default terminal for interactive use (default: empty string, i.e. use gnuplot settings);
204
204
- `mime::Dict{DataType, String}`: dictionary of MIME types and corresponding gnuplot terminals. Used to export images with either [`save()`](@ref) or `show()` (see [Display options](@ref));
205
-
- `gpviewer::Bool`: use a gnuplot terminal as main plotting device (if `true`) or an external viewer (if `false`);
205
+
- `gpviewer::Bool`: force using a gnuplot terminal as main plotting device (if `true`) or use Julia multimedia I/O, which automatically selects between the gnuplot terminal and external viewers (if `false`);
206
206
- `init::Vector{String}`: commands to initialize the session when it is created or reset (e.g., to set default palette);
207
207
- `verbose::Bool`: verbosity flag (default: `false`)
208
208
- `preferred_format::Symbol`: preferred format to send data to gnuplot. Value must be one of:
0 commit comments