JuliaPlots / InspectDR.jl

Fast, interactive Julia/GTK+ plots (+Smith charts +Gtk widget +Cairo-only images)
MIT License
68 stars 9 forks source link

Problem plotting with Julia 1.6.0 and Plots #24

Closed cdhf closed 3 years ago

cdhf commented 3 years ago

On Julia 1.6.0 with Plots 1.11.0 and InspectDR 0.4.0 I get an error "type Plot2D has no field plotbb".

Any simple plot givse the same error, eg

using Plots, InspectDR inspectdr() plot([1,2,3])

The samples work fine.

ma-laforge commented 3 years ago

Yes. Sorry. I've made a PR to sync up Plots with InspectDR 0.4.0 around the same time I changed the InspectDR API: --> https://github.com/JuliaPlots/Plots.jl/pull/3374

Reason

Sadly, there is no versioning system between Plots.jl and its backends. It is a problem with Julia not handling "conditional dependencies". Plots.jl doesn't want to force all of its users to install all of its backends (esp. in case one of their builds accidentally breaks). I tried creating warnings from InspectDR, but my solution doesn't really work that well. I've sort of given up on that system.

Solution

So while we wait for my PR to get merged, you'll have to pin InspectDR to a pre-v0.4.0 version (I suggest the most-recent pre-v0.4.0 version):

julia> ]
pkg> pin InspectDR@0.3.10

Going back to normal

And unfortunately, once Plots.jl finally does merge this PR, you will have to free & update the InspectDR package back to v0.4.0:

julia> ]
pkg> free InspectDR
pkg> update InspectDR
pkg> update Plots

Because newer Plots versions will be incompatible with older InspectDR versions.

ma-laforge commented 3 years ago

Actually @cdhf, the merge just happened, and a new release was tagged. Everything should work again with the new release of Plots.jl v1.11.1.

Please tell me if it is working for you now if you update your version of Plots.jl (and go back to InspectDR v0.4.0 if you pinned it to a previous version).

cdhf commented 3 years ago

Yes it works now, thanks! I found another problem, but that will be another issue :-)