Closed V-Sher closed 4 years ago
Using the pc_obj
from the examples in that documentation entry, the following seems to work:
gg <- plot(pc_obj, type = "sc", linetype = "solid", color = "red", size = 2, plot = FALSE)
gg$layers <- rev(gg$layers)
show(gg)
Works like a charm. Thank you so much. 👍
I am following the worked example in the documentation (https://rdrr.io/cran/dtwclust/man/tsclusters-methods.html) to plot the time series along with the centroid. By default, the centroid is drawn with a dashed grey line infront of the time series. My goal is to change the linetype to solid (and maybe change color too). But the problem is when I change the parameter linetype = "solid", the centroid is being sent to the background. That is, the other time series are obscuring the centroid. But I know for a fact the solid line is plotted because if I increase the size parameter to 3.5, I can see the centroid time series in the background (see the screenshot below).
The worked example in the documentation above shows how to change the linetype to solid (line 24 under Examples section) but therein the parameter type = "c" so there is no concept of foreground or background, whereas in my case I want both series and centroid to be plotted but with centroid in front of the time series. Something like this![Screen Shot 2019-08-27 at 9 51 22 AM](https://user-images.githubusercontent.com/18684411/63791365-34f85500-c8b0-11e9-88bc-92516389bd3f.png)
Any ideas on how that can be done?