I'm a relative novice with Illustrator and I am looking for the best way to make a line with multiple color segments. For example, here is my feeble attempt by just making three lines and trying to align them manually. I can not add an attachment as I do not have enough points yet, so here is a link to an example I created:
Notice that the segments are not connecting together smoothly. How can I make a line with multi-colored segments? Thanks for the help.