Plots.jl: Negative radius with polar coordinates

Created on 26 Apr 2019  路  7Comments  路  Source: JuliaPlots/Plots.jl

Negative radii are silently dropped, but the corresponding angle entries are not:

julia> plot(rand(200), rand(200) .- 0.5, proj=:polar)
Error showing value of type Plots.Plot{Plots.GRBackend}:
ERROR: BoundsError: attempt to access 105-element Array{Float64,1} at index [1:200]

this is with:

  [28b8d3ca] GR v0.39.1
  [91a5bcdd] Plots v0.24.0

Previously negative radii were handled just fine (e.g., the points were plotted as if the angle was 180掳 and the radius was positive). The change happened at some time in the last year I think (this worked fine when I wrote the code ~1 year ago).

help wanted

Most helpful comment

Should be restored in #2010

All 7 comments

Same issue with PlotlyJS and PGFplots backends. Seems like this is in Plots, not backend dependent.

I'm not sure if it would be better to drop also the corresponding angles or to restore the old behaviour @kleinschmidt describes. Any opinions?

I'd vastly prefer the old behaviour.

Should be restored in #2010

Fantastic, thanks for the quick attention.

Thanks for reporting!

So awesome @daschw

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pkofod picture pkofod  路  3Comments

Cody-G picture Cody-G  路  3Comments

jebej picture jebej  路  4Comments

daschw picture daschw  路  3Comments

PallHaraldsson picture PallHaraldsson  路  4Comments