vtraag / tikz-colorbrewer

Definition files providing colours as defined by the ColorBrewer project.
34 stars 7 forks source link

Proof of concept for loading cycle list definitions from separate files ... #3

Open jdugge opened 10 years ago

jdugge commented 10 years ago

...using the 'cycle list name' key. This is an attempt to address issue #2.

When 'cycle list name' is called, we first check whether that cycle list is already defined. If it isn't, we check whether a file with the cycle list name exists. If it does, we construct the cycle list from that file, using code provided by Christian Feuersänger at http://tex.stackexchange.com/a/32064/2552. If it doesn't, we display an error message.

This is only a proof of concept, only the "YlGn-3" and "Set1-4" cycle lists are defined.

vtraag commented 9 years ago

OK, took a bit longer than a week... :)

Seems to work fine when using cycle list name. For cycle mulit list this doesn't work. Would it be possible to ensure that both would be working correctly?

Also, I wonder if something similar can be done for all the colormaps? I've taken a brief look, and I'm not sure if you can hook similarly into /colormap name/.code. Simply trying \pgfplotsset{/pgfplots/cycle list name/.code={#1}} should presumably then work correctly, no? But alas, that doesn't seem to work.

If this would lead to a somewhat buggy implementation, working for some specifications and not for others, I'm hesitant to use it. At least I'm willing to sacrifice speed and wait a little longer if I'm sure it will work as usual (and I guess some other as well). Put differently, I don't want to put in too much time debugging things for this library. :) Perhaps another (simpler and more stable) option is to split the file in parts, so that you don't always load everything when you only need a single style.