Hello,

I'm trying to create a parallel axis dot plot where each line has a different colour (I've managed to get everything else I want). The current one I have built has all the lines as one colour, navy (I must admit I usually don't favour multiple colours as they can become confusing, but in this case there aren't excessive observations). I've attached an example of my dataset, the code I've been using to generate the plot and a .png attachment of what it looks like so far.

I'm using Stata version 16.1 on macOS Big Sur version 11.2.3.

This is an example of my dataset

Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input double F byte CaN double G byte CaoN
 3.4 0 10.4 1
 5.8 0   18 1
 5.8 0 15.1 1
 6.4 0 20.4 1
   8 0 13.3 1
12.5 0   17 1
13.5 0 18.3 1
 7.1 0 18.3 1
17.8 0   22 1
 2.8 0 20.9 1
   6 0 12.9 1
13.3 0 27.1 1
 9.6 0 23.2 1
 4.3 0 11.8 1
 9.5 0 16.8 1
   2 0  8.4 1
 4.7 0 12.8 1
 6.4 0 15.9 1
 2.9 0   24 1
   3 0 13.4 1
 7.1 0 31.5 1
 6.2 0 24.7 1
 2.1 0   26 1
 4.6 0 19.7 1
 2.2 0 41.4 1
 1.9 0 14.5 1
11.2 0 18.3 1
13.3 0 20.4 1
 4.3 0 13.6 1
12.7 0   16 1
end
The code I have used to generate my plot is below:

Code:
twoway pcspike F CaN G CaoN, title(Parallel axis dot plot) || scatter F CaN, msym(O) pstyle(p2) || scatter G CaoN, msym(O) pstyle(p4) ytitle(EGM Amplitude (mV))  xla( ""  "",notick) legend(order(2 "Cathodal-anodal capture" 3 "Cathodal or anodal capture"))
Thank you very much for your help,

Don