shape_coords fixes; makekw
This commit is contained in:
parent
dd7462bd3f
commit
e24acece49
@ -270,7 +270,7 @@ end
|
|||||||
|
|
||||||
# draw ONE Shape
|
# draw ONE Shape
|
||||||
function gr_draw_marker(xi, yi, msize, shape::Shape)
|
function gr_draw_marker(xi, yi, msize, shape::Shape)
|
||||||
sx, sy = shape_coords(shape)
|
sx, sy = coords(shape)
|
||||||
# convert to ndc coords (percentages of window)
|
# convert to ndc coords (percentages of window)
|
||||||
GR.selntran(0)
|
GR.selntran(0)
|
||||||
xi, yi = GR.wctondc(xi, yi)
|
xi, yi = GR.wctondc(xi, yi)
|
||||||
|
|||||||
@ -375,7 +375,7 @@ function plotly_close_shapes(x, y)
|
|||||||
xs, ys = nansplit(x), nansplit(y)
|
xs, ys = nansplit(x), nansplit(y)
|
||||||
for i=1:length(xs)
|
for i=1:length(xs)
|
||||||
shape = Shape(xs[i], ys[i])
|
shape = Shape(xs[i], ys[i])
|
||||||
xs[i], ys[i] = shape_coords(shape)
|
xs[i], ys[i] = coords(shape)
|
||||||
end
|
end
|
||||||
nanvcat(xs), nanvcat(ys)
|
nanvcat(xs), nanvcat(ys)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -142,7 +142,7 @@ function py_linestyle(seriestype::Symbol, linestyle::Symbol)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function py_marker(marker::Shape)
|
function py_marker(marker::Shape)
|
||||||
x, y = shape_coords(marker)
|
x, y = coords(marker)
|
||||||
n = length(x)
|
n = length(x)
|
||||||
mat = zeros(n+1,2)
|
mat = zeros(n+1,2)
|
||||||
for i=1:n
|
for i=1:n
|
||||||
|
|||||||
@ -322,18 +322,18 @@ end
|
|||||||
|
|
||||||
@recipe function f(shape::Shape)
|
@recipe function f(shape::Shape)
|
||||||
seriestype --> :shape
|
seriestype --> :shape
|
||||||
shape_coords(shape)
|
coords(shape)
|
||||||
end
|
end
|
||||||
|
|
||||||
@recipe function f(shapes::AVec{Shape})
|
@recipe function f(shapes::AVec{Shape})
|
||||||
seriestype --> :shape
|
seriestype --> :shape
|
||||||
shape_coords(shapes)
|
coords(shapes)
|
||||||
end
|
end
|
||||||
|
|
||||||
@recipe function f(shapes::AMat{Shape})
|
@recipe function f(shapes::AMat{Shape})
|
||||||
seriestype --> :shape
|
seriestype --> :shape
|
||||||
for j in 1:size(shapes,2)
|
for j in 1:size(shapes,2)
|
||||||
@series shape_coords(vec(shapes[:,j]))
|
@series coords(vec(shapes[:,j]))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -493,6 +493,8 @@ zlims(sp_idx::Int = 1) = zlims(current(), sp_idx)
|
|||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
|
|
||||||
|
makekw(; kw...) = KW(kw)
|
||||||
|
|
||||||
wraptuple(x::Tuple) = x
|
wraptuple(x::Tuple) = x
|
||||||
wraptuple(x) = (x,)
|
wraptuple(x) = (x,)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user