ggplotd - curve colour

Edwin van Leeuwen via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 8 01:46:38 PDT 2016


On Sunday, 8 May 2016 at 01:50:38 UTC, brocolis wrote:
> How do I set the color of a curve with ggplotd?
> Thanks.

You can set colours by name:
https://github.com/BlackEdder/ggplotd/blob/master/source/ggplotd/colour.d#L20

Alternatively you can pass through the RGB value (see the link 
above for the specification).

Finally if you have multiple curves and don't want to specify 
specific colours you can just give them a different identifier 
(e.g. different double/int value (any type should do)) and it 
will chose the colours according to the colourgradient used. 
There is an example on how to specify your own gradient in the 
hist3D.svg example:
http://blackedder.github.io/ggplotd/ggplotd.html


More information about the Digitalmars-d-learn mailing list