0

First of all, please note that I am a very inexperienced user of R, so please apologize if I have a silly question.

I would like to colour the lines in the path.plot, but I have not been able to do this (certainly not a problem with R, but my ignorance).

I ran a synthetic control and wanted to plot the results as follows:

`

path.plot(synth.res = synth_GDP,
          dataprep.res = prep_data_GDP,
          tr.intake = "2011",
          Ylab = "GDP Growth", 
          Xlab = "Year",
          Ylim = c(-5,5),
          Legend = c("Treated State","Synthetic State"),
          Legend.position = "bottomright",
          Main = "Contrafactual Comparison",
)

`

Although I receive a plot, the two lines are black and therefore harldy distinguishable. I would like to colour them, but I have not been able to do so (I have tried various things, always get error messages, and due to my relatively little knowledge of R, I have not been able to solve the problem by searching the internet either)

Can you tell me how I can define a colour for these lines?

Thanks a lot!

Marc
  • 1
  • Welcome to SO! For this question and future R-related questions, I recommended tagging your posts with `r` and making sure that the examples in your question are [reproducible](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). Can you provide some or all of your data using `dput(name_of_your_data)`? – jrcalabrese Nov 03 '22 at 01:31

0 Answers0