Color function in vistime() not working

In vistime(), the function col.color does not assign the same colour for the same party. In the reprex below, I have four observations with political party PJ, but they assume different colours.

Can you help me with this? I would like to have different observations/presidents, but with the same colour, indicating that the party continuity.

My code:

timeline <- vistime(crono,
        col.event = "Presidente",
        col.start = "Inicio",
        col.end = "Fim", = "Pais",
        col.color = "Partido",
        title = "Cronología de los presidentes en los Estados Parte del Mercosur",
        optimize_y = FALSE, linewidth = 20)
  stringsAsFactors = FALSE,
        Presidente = c("Carlos Menem",
                       "Fernando de la Rúa","Adolfo Rodríguez Saá","Eduardo Duhalde",
                       "Néstor Kirchner"),
           Partido = c("PJ", "UCR", "PJ", "PJ", "PJ"),
              Pais = c("Argentina","Argentina",
            Inicio = c("1989-07-08","1999-12-10",
               Fim = c("1999-12-10","2001-12-21",

I managed to do it by creating a new column and assigning colour codes equivalent to each party.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.