fix plotly
This commit is contained in:
parent
ba9a8d52cc
commit
5797ad2d5b
@ -580,9 +580,19 @@ function plotly_series(plt::Plot, series::Series)
|
|||||||
end
|
end
|
||||||
|
|
||||||
# set the "type"
|
# set the "type"
|
||||||
if st in (:path, :scatter, :scattergl, :straightline, :path3d, :scatter3d)
|
if st in (:path, :straightline, :path3d)
|
||||||
return plotly_series_segments(series, d_out, x, y, z)
|
return plotly_series_segments(series, d_out, x, y, z)
|
||||||
|
|
||||||
|
elseif st in (:scatter, :scattergl)
|
||||||
|
d_out[:type] = string(st)
|
||||||
|
d_out[:mode] = hasline ? "lines+markers" : "markers"
|
||||||
|
d_out[:x], d_out[:y] = x, y
|
||||||
|
|
||||||
|
elseif st == :scatter3d
|
||||||
|
d_out[:mode] = string(st)
|
||||||
|
d_out[:mode] = hasline ? "lines+markers" : "markers"
|
||||||
|
d_out[:x], d_out[:y], d_out[:z] = x, y, z
|
||||||
|
|
||||||
elseif st == :heatmap
|
elseif st == :heatmap
|
||||||
d_out[:type] = "heatmap"
|
d_out[:type] = "heatmap"
|
||||||
d_out[:x], d_out[:y], d_out[:z] = x, y, z
|
d_out[:x], d_out[:y], d_out[:z] = x, y, z
|
||||||
@ -753,15 +763,14 @@ function plotly_series_segments(series::Series, d_base::KW, x, y, z)
|
|||||||
|
|
||||||
# add "marker"
|
# add "marker"
|
||||||
if hasmarker
|
if hasmarker
|
||||||
inds = eachindex(x)
|
|
||||||
d_out[:marker] = KW(
|
d_out[:marker] = KW(
|
||||||
:symbol => get(_plotly_markers, series[:markershape], string(series[:markershape])),
|
:symbol => get(_plotly_markers, _cycle(series[:markershape], i), string(_cycle(series[:markershape], i))),
|
||||||
# :opacity => series[:markeralpha],
|
# :opacity => series[:markeralpha],
|
||||||
:size => 2 * series[:markersize],
|
:size => 2 * _cycle(series[:markersize], i),
|
||||||
:color => rgba_string.(plot_color.(get_markercolor.(series, inds), get_markeralpha.(series, inds))),
|
:color => rgba_string.(plot_color.(get_markercolor.(series, i), get_markeralpha.(series, i))),
|
||||||
:line => KW(
|
:line => KW(
|
||||||
:color => rgba_string.(plot_color.(get_markerstrokecolor.(series, inds), get_markerstrokealpha.(series, inds))),
|
:color => rgba_string.(plot_color.(get_markerstrokecolor.(series, i), get_markerstrokealpha.(series, i))),
|
||||||
:width => series[:markerstrokewidth],
|
:width => _cycle(series[:markerstrokewidth], i),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user