-
-
Notifications
You must be signed in to change notification settings - Fork 370
replace PLOTS_DEFAULT_BACKEND by Preferences #4517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
ad48f28
2c9fc30
4594d1a
8cc13b3
beec510
4a05359
3356eb6
8918c1a
107b4d2
55184bb
3eefc38
250bb67
8d93d52
c828b9d
bd57b8b
4a196e4
17a55f3
6c46d8f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ using Scratch | |
| using REPL | ||
|
|
||
| const plotly_local_file_path = Ref{Union{Nothing,String}}(nothing) | ||
| const BACKEND_PATH_GR = @path joinpath(@__DIR__, "backends", "gr.jl") | ||
| const BACKEND_PATH_GASTON = @path joinpath(@__DIR__, "backends", "gaston.jl") | ||
| const BACKEND_PATH_HDF5 = @path joinpath(@__DIR__, "backends", "hdf5.jl") | ||
| const BACKEND_PATH_INSPECTDR = @path joinpath(@__DIR__, "backends", "inspectdr.jl") | ||
|
|
@@ -63,6 +64,11 @@ function __init__() | |
| ) | ||
| end, | ||
| ) | ||
| if _default_backend() === :gr | ||
|
||
| @require GR = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" begin | ||
| include(BACKEND_PATH_GR) | ||
| end | ||
| end | ||
|
|
||
| @require HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" begin | ||
| include(BACKEND_PATH_HDF5) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| using Plots, Test | ||
|
|
||
| const plots_path = escape_string(pkgdir(Plots)) | ||
|
|
||
| @testset "Default Backend" begin | ||
| out = withenv("PLOTS_DEFAULT_BACKEND" => "Plotly") do | ||
| run(``` | ||
| $(Base.julia_cmd()) -E """ | ||
| using Pkg | ||
| Pkg.activate(; temp = true) | ||
| Pkg.develop(path = \"$(plots_path)\") | ||
| using Test | ||
| using Plots | ||
| @test backend() == Plots.PlotlyBackend() | ||
| """ | ||
| ```) | ||
| end | ||
| @test out.exitcode == 0 | ||
| end |
Uh oh!
There was an error while loading. Please reload this page.