How can I plot several series in groups in Julia?

I am trying to plot a large number of line series in Julia, and I want to use two colors to differentiate between two groups.

With the code below, which uses a small dataset, I get the following:

using Plots
toy = rand(10, 5)
color = rand(0:1, 5)
full = vcat(toy, color')

plot(full, label = color)

enter image description here

What I am trying to do is to have only two colours, corresponding to the value in "color" {0, 1}. How can I do that?

PS: I have seen a similar question for matplotlib: How do I plot multiple time series grouped by different colours?



from Recent Questions - Stack Overflow https://ift.tt/3w9SIxZ
https://ift.tt/3tXmnIS

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations