Skip to content
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

Constant deprecation warning when using StatsPlots in Pluto notebook #3746

Closed
mkschleg opened this issue Aug 3, 2021 · 1 comment · Fixed by #4123 · May be fixed by #3357
Closed

Constant deprecation warning when using StatsPlots in Pluto notebook #3746

mkschleg opened this issue Aug 3, 2021 · 1 comment · Fixed by #4123 · May be fixed by #3357

Comments

@mkschleg
Copy link

mkschleg commented Aug 3, 2021

Details

Whenever I'm using StatsPlots in a pluto notebook I get the following warning.

┌ Warning: seriestype violin has been moved to StatsPlots.  To use: `Pkg.add("StatsPlots"); using StatsPlots`
└ @ Plots ~/.julia/packages/Plots/Awg62/src/args.jl:1206

To reproduce, in a pluto notebook just do:

using StatsPlots
violin(rand(20))

This floods the standard output on the terminal running the pluto notebook server.

Plots.jl version: 1.20.0
Backend version (]st -m <backend(s)>):
Output of versioninfo():

Julia Version 1.6.0
Commit f9720dc2eb (2021-03-24 12:55 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.6.0)
  CPU: Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, icelake-client)
@sethaxen
Copy link
Member

sethaxen commented Feb 5, 2022

This issue came up again in fonsp/Pluto.jl#1870. There, I said:

The warning about violin moving to StatsPlots is being trigged here because this condition evaluates to false:

if st in (:boxplot, :violin, :density) && !isdefined(Main, :StatsPlots)

@fonsp explained that Pluto doesn't evaluate user code in Main and suggested replacing !isdefined(Main, :StatsPlots) with fonsp/Pluto.jl#1870 (comment):

!haskey(
	Base.loaded_modules, 
	Base.PkgId(
		Base.UUID("3fa0cd96-eef1-5676-8a61-b3b8758bbffb"), 
		"REPL"
	)
)

This would be an alternative (and perhaps simpler?) fix to #3357, which it seems has stalled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants