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

[BUG] no method matching getproperty and outdated matplotlib with the latest version and pyplot #3917

Closed
HumpyBlumpy opened this issue Nov 1, 2021 · 3 comments
Labels

Comments

@HumpyBlumpy
Copy link

HumpyBlumpy commented Nov 1, 2021

Details

I am getting the following error and warning when try to display a plot constructed using scatter as follows:

pyplot()
p1=scatter(abs.(wf).^2)
display(p1)

The error and warning about outdated matplotlib (I performed the exact instructions it suggested but it didnt change anything; I also rebuilt Plots after performing the said instructions)

┌ Warning: You are using Matplotlib 2.2.3, which is no longer
│ officialy supported by the Plots community. To ensure smooth Plots.jl
│ integration update your Matplotlib library to a version >= 3.4.0
│ 
│ If you have used Conda.jl to install PyPlot (default installation),
│ upgrade your matplotlib via Conda.jl and rebuild the PyPlot.
│ 
│ If you are not sure, here are the default instructions:
│ 
│ In Julia REPL:
│ ```
│ import Pkg;
│ Pkg.add("Conda")
│ import Conda
│ Conda.update()
│ Pkg.build("PyPlot")
│ ```
│ 
└ @ Plots ~/.julia/packages/Plots/LSKOd/src/backends/pyplot.jl:29
ERROR: LoadError: MethodError: no method matching getproperty(::Dict{Any, Any}, ::String)
Closest candidates are:
  getproperty(::PyPlot.LazyPyModule, ::AbstractString) at /home/ron/.julia/packages/PyPlot/XaELc/src/plot3d.jl:16
  getproperty(::PyCall.PyObject, ::AbstractString) at /home/ron/.julia/packages/PyCall/3fwVL/src/PyCall.jl:311
  getproperty(::PyPlot.Figure, ::AbstractString) at /home/ron/.julia/packages/PyPlot/XaELc/src/PyPlot.jl:66
  ...
Stacktrace:
 [1] _before_layout_calcs(plt::Plots.Plot{Plots.PyPlotBackend})
   @ Plots ~/.julia/packages/Plots/LSKOd/src/backends/pyplot.jl:1209
 [2] prepare_output(plt::Plots.Plot{Plots.PyPlotBackend})
   @ Plots ~/.julia/packages/Plots/LSKOd/src/plot.jl:217
 [3] display(#unused#::Plots.PlotsDisplay, plt::Plots.Plot{Plots.PyPlotBackend})
   @ Plots ~/.julia/packages/Plots/LSKOd/src/output.jl:147
 [4] display(x::Any)
   @ Base.Multimedia ./multimedia.jl:328
 [5] #76
   @ ~/.vscode/extensions/julialang.language-julia-1.4.3/scripts/packages/VSCodeServer/src/display.jl:156 [inlined]
 [6] with_no_default_display(f::VSCodeServer.var"#76#77"{Plots.Plot{Plots.PyPlotBackend}})
   @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.4.3/scripts/packages/VSCodeServer/src/display.jl:34
 [7] display(d::VSCodeServer.InlineDisplay, x::Plots.Plot{Plots.PyPlotBackend})
   @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.4.3/scripts/packages/VSCodeServer/src/display.jl:156
 [8] display(x::Any)
   @ Base.Multimedia ./multimedia.jl:328
 [9] top-level scope

Backends

This bug occurs on ( insert x below )

Backend yes no untested
gr (default) x
pyplot x
plotlyjs x
pgfplotsx x
unicodeplots x
inspectdr x
gaston x

Versions

The issue does not occur in Plots v1.20.1, but it does occur in the latest version Plots v1.23.2. I have not tested other versions.

@HumpyBlumpy HumpyBlumpy added the bug label Nov 1, 2021
@HumpyBlumpy HumpyBlumpy changed the title [BUG] [BUG] no method matching getproperty and outdated matplotlib with the latest version and pyplot Nov 1, 2021
@isentropic
Copy link
Member

The MPL you are using is ancient "You are using Matplotlib 2.2.3"

@isentropic
Copy link
Member

It is hard to tell why the commands did not update your mpl properly. Make sure that the standalone PyPlot.jl uses better than 3.4

@uchiiii
Copy link

uchiiii commented Nov 11, 2021

@HumpyBlumpy
Could you share how you fixed this bug if you did already?

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

No branches or pull requests

3 participants