allow negative radii in polar plots for pyplot
This commit is contained in:
parent
b053366b06
commit
a6588daa3e
@ -376,6 +376,18 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
elseif st == :shape
|
||||
x, y = shape_data(series)
|
||||
end
|
||||
|
||||
if ispolar(series)
|
||||
# make negative radii positive and flip the angle
|
||||
# (PyPlot ignores negative radii)
|
||||
for i in eachindex(y)
|
||||
if y[i] < 0
|
||||
y[i] = -y[i]
|
||||
x[i] -= π
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
xyargs = (st in _3dTypes ? (x,y,z) : (x,y))
|
||||
|
||||
# handle zcolor and get c/cmap
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user