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",
col.group = "Pais",
col.color = "Partido",
title = "Cronología de los presidentes en los Estados Parte del Mercosur",
optimize_y = FALSE, linewidth = 20)
crono<-data.frame(
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",
"Argentina","Argentina","Argentina"),
Inicio = c("1989-07-08","1999-12-10",
"2001-12-23","2002-01-02","2003-05-25"),
Fim = c("1999-12-10","2001-12-21",
"2001-12-30","2003-05-25","2007-12-10")
)