emolch/pyrocko — pull request #18 by HerrMuellerluedenscheid (2013-12-15 15:58:32+00:00)
Title: Issue 16: cake plot-* using phase definition for color coding

Hi there,

From now on, rays in cake plots can be colored either by their path or definition. A legend can be added, too. The color is deduced from the paths' definition string. Thus, equally defined paths are colored the same each time they are plotted with one of cakes' plotting options. It may happen, that two different path definitions result in the same color code. This can be avoided using an "avoid_same_color=True" option. By doing so, a formerly used color id will be replaces with another, unused one.
Still, If all 21 colors are in use duplicates are unavoidable, yet.

cake plot-rays --classic=p,P,s,sP,S --sdepth=100 --distances=0,1500,100

Gives:

![farbuloes](https://f.cloud.github.com/assets/1038455/1750610/74e0a1b8-65a1-11e3-811a-9f0a56dac517.png)

Marius

--
(What still needs to be done is to extend possible options that are parsed when cake is invoked from the command line. I mean options like --with-legend or --color-by-definition)