Open skanskan opened 7 years ago
Unfortunately, this error is due to the fact that InspectDR is still evolving - and I don't really have a perfect solution to match revisions of InspectDR with those of Plots.jl.
When adding functionnality to InspectDR, or simply fixing structural flaws, I sometimes need to modify the InspectDR API (and Plots.jl depends on the API being fixed).
Thus, when a change in API happens, I also have to update the inspectdr()
glue code in Plots.jl.
Currently, InspectDR v0.2.2 is only supported by the master branch of Plots.jl... Still waiting on the next tagged release.
If ever you find Plots.jl crashes when you use inspectdr()
... Simply look at the message you get when you call using InspectDR on a fresh Julia session:
Julia> using InspectDR
INFO: InspectDR not known to be compatible with current version of Plots.jl.
Latest known compatible versions:
Plots 0.12.0 => InspectDR 0.2.0.
If difficulties occur, you can pin to an older version:
julia> Pkg.pin("InspectDR", v"0.2.0")
...don't forget to free to enable future updates:
julia> Pkg.free("InspectDR")
See NEWS.md for more details on compatibility.
That basically tells you what to do - which is to "pin" the version of InspectDR to one that is compatible with the current version of plots:
Julia> Pkg.pin("InspectDR", v"0.2.0")
Note that, once pinned to InspectDR v0.2.0, you will get a similar INFO message indicating that the last known compatible (Plots, InspectDR) couplet is even older. Please ignore this message. It is due to the fact that v0.2.0 of InspectDR was not actually aware that it was compatible with Plots v0.12.0 when it was published.
@ma-laforge thank you for your help. I also did that before writing here, I tried pinning InspectDR v0.2.0 but didn't work either. As you say the problem is an incompatibility between Plots and InspectDR current versions.
That's very odd... Is it possible the Pkg.Pin
operation did not work correctly?
Would you mind checking which versions you are using:
julia> Pkg.installed("InspectDR")
v"0.2.0"
julia> Pkg.installed("Plots")
v"0.12.0"
Please make sure there is no "+" sign in the installed version... that would mean you don't actually have a "official" tagged release.
My current config is: Julia v0.6.0-rc2.0 + Windows 7
...I will try installing the actual v0.6 release soon to make sure it still works...
I have just confirmed that the (Plots v0.12.0, InspectDR v0.2.0) combination works well using the actual Julia v0.6 release in Windows 7 (Also works in Linux).
If this is still not working for you, you can always try using the master branch of Plots.jl with the most recent tagged version of InspectDR:
julia> Pkg.free("InspectDR")
julia> Pkg.installed("InspectDR")
v"0.2.2"
julia> Pkg.checkout("Plots")
julia> Pkg.installed("Plots")
v"0.12.0+"
Just make sure that you have the newest versions:
julia> Pkg.update()
Could you please tell me what syntax should I try to see if it works properly?
Not certain what you mean in this last question.
What I was suggesting above was to confirm if the InspectDR/Plots installations truly were at the desired versions by running Pkg.installed
on both of them.
I then suggested you try out a different version combination of Plots.jl (master) & InspectDR.jl (latest) as an alternative... just so you could try something else that is supposed to work (Though this should not be necessary).
The example you wrote above works perfectly for me when I have the proper combination of versions:
using Plots
inspectdr()
plot(Plots.fakedata(50,5),w=3)
--> This works fine for me. If it doesn't, please write back with the output you get when you run:
Pkg.installed("InspectDR")
Pkg.installed("Plots")
I reinstalled all again and now it seems to work even with InspectDR v0.2.2 and Plots v0.12.0+
I don't know what changed.
Thanks
Great it works!
I think I know why you were confused:
There are 2 known configurations that work:
(Plots, InspectDR) = (v"0.12.0", v"0.2.0") or (master, v"0.2.2")
Note that to get the master branch of Plots.jl, you had to do:
Pkg.checkout("Plots")
(Or simply git checkout master
- from the command line)
If you check out the master branch of Plots - Pkg.installed("Plots")
will say "v0.12.0+" - instead of "master" for some reason.
...So what you see makes sense.
Hello
I've installed InspectDR.jl and tried to plot the example.
The installation and the next two lines work well without errors:
But when I try
plot(Plots.fakedata(50,5),w=3)
I get this error:
Other Plot frameworks work properly.
I'm using Julia 0.6 on Windows 10 x64