-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
Specify backend while "using Plots" with PlutoPkg #1305
Comments
Like @lllusion3418 suggested, import the backend package before importing Plots, eg: begin
import PyPlot
using Plots
end By importing it, you tell Pluto that the package should be installed in the env, making it available to Plots.jl. |
The choice to shield your notebook from knowing about a global installation of PyPlot is deliberate: we want notebooks to run independently of what packages you have installed elsewhere. If not isolated, you might have a hidden dependency on the global PyPlot installation. Someone else opening your notebook would not be able to run it. |
@lllusion3418 (and others) feel free to add a PR to "detect and rewrite" that error message. Take a look at https://github.com/fonsp/Pluto.jl/blob/main/frontend/components/ErrorMessage.js |
Suggestion of @lllusion3418 works for me, you can close this issue. Or, if you want to keep it open to discuss about the error message, thats also fine. Also, you can add this suggestion in the documentation of PlutoPkg, so others can easily find it. |
I am using the built-in package manager of Pluto. Is there a working example where I can see how to use different backends with Plots, currently gr and plotly are working by default. pyplot gives
The text was updated successfully, but these errors were encountered: