Re: [R] Choosing colours for lines in ggplot2

2023-08-03 Thread Kimmo Elo
Hi, when using 'scale_colours_manual' the colours must be defined as value- color pairs (i.e. "A"="red", "B"="blue" an so on). If you read the documentation it is recommended to use a named vector. If I understood it correctly, in your code #2 R understood the variable "Stat" as a number (i.e.

Re: [R] Choosing colours for lines in ggplot2

2023-08-02 Thread Rui Barradas
Às 18:10 de 02/08/2023, Nick Wray escreveu: Hello - I am trying to plot flows in a number of rivers within the same plot, and need to colour the lines differently, using a colour-blind palette. Code beneath works but has colours assigned by the program I have made some simple dummy data: ##