Let’s say we have a plotting function returning a handle like this one: h=plot(x, y, seriestype:scatter)
And, afterwards, we decided to change the scatter points to a solid line.
I tried to do the following:
h.series_list[1].plotattributes[:seriestype]=:line
h
But it gives following error:
Error showing value of type Plots.Plot{Plots.PyPlotBackend}:
ERROR: BoundsError: attempt to access 0-element Array{Any,1} at index [1]
using Plots
#plots backend doesn't matter. I can use any. Question is general how to do it.
h=plot(rand(5), rand(5), seriestype=:scatter)
h.series_list[1].plotattributes[:seriestype]=:line
h
With PyPlot it produces mentioned above error. With GR it creates empty plot.
I suppose the reason is, there are some other parameters (e.g. line thickness) that I should change to update the curves. But maybe there is a simple solution?