faq 109547490 - matsim-org/matsim-code-examples GitHub Wiki
by Henrik Bette on 2017-05-19 11:09:49
I would like to implement a coloring scheme, that I can customize whenever I need to. Is there a standard way to do it?
by Kai Nagel on 2017-05-24 14:39:45
Nope, sorry. If you look at OGLAgentPointLayer, you can see how it is done. Should be easy to make it pluggable, but is not there yet. Do you want to try and submit as a patch? Roughly the following steps:
- replace the
ColorinaddAgentby an interface, e.g.OTFVisColoringScheme. - put the static method coloring schemes into implementations of that class
- put something like
bind(OTFVisColoringScheme.class).to(DefaultOTFVisColoringScheme.class)intoOTFVisLiveModule. - Somehow get this information passed through to
OGLAgentPointLayer. (This looks like the hardest part.)
As an alternative, you could just change OGLAgentPointLayer in a checkout that you have. Not beautiful, but pragmatic.
Maybe someone else has a better idea.
by Henrik Bette on 2017-06-14 13:23:56
Thank you!
I am working with the pragmatic approach right now. Might try to implement it later.