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

Weird messages with StatsPlots.jl #1870

Closed
aerdely opened this issue Jan 29, 2022 · 6 comments
Closed

Weird messages with StatsPlots.jl #1870

aerdely opened this issue Jan 29, 2022 · 6 comments
Labels
good first issue Good for newcomers other packages Integration with other Julia packages

Comments

@aerdely
Copy link

aerdely commented Jan 29, 2022

  1. Video:
PlutoViolin.mp4
  1. Pluto notebook file: violin.jl
@aerdely aerdely changed the title Weird messages with StatsPlots Weird messages with StatsPlots.jl Jan 30, 2022
@fonsp
Copy link
Owner

fonsp commented Jan 30, 2022

Thanks! The are warning logs sent by StatsPlots, (Pluto recently started displaying logs). Can you also report this to StatsPlots.jl?

@fonsp fonsp added the other packages Integration with other Julia packages label Jan 30, 2022
@aerdely
Copy link
Author

aerdely commented Jan 31, 2022

Sure! Thanks.

@sethaxen
Copy link

The warning about violin moving to StatsPlots is being trigged here because this condition evaluates to false:
https://github.com/JuliaPlots/Plots.jl/blob/2896c5a25a40d72c635dd60b307fe1446ec70c2f/src/args.jl#L1578
That is, StatsPlots does not appear to be in the Main namespace when loaded in Pluto. @fonsp, is this expected behavior?

@fonsp
Copy link
Owner

fonsp commented Feb 1, 2022

Thanks for debugging! This is expected, we don't evaluate user code in Main because we manage the scope.

Plots should probably use Base.loaded_modules instead, e.g.

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

(You can get a reference to the package by using getindex instead of haskey.)

@fonsp
Copy link
Owner

fonsp commented Feb 5, 2022

Can someone make a PR to Plots.jl to solve this? 💖

@sethaxen
Copy link

sethaxen commented Feb 5, 2022

I found it's a duplicate of JuliaPlots/Plots.jl#3746, where a solution was previously started on but unfinished, so let's continue the discussion there.

@fonsp fonsp closed this as completed Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers other packages Integration with other Julia packages
Projects
None yet
Development

No branches or pull requests

3 participants