Hello John,
On 25.05.06, John Owens wrote:
> functionpalette looks like a terrific function. Could you provide a minimal
> example of how it is used?
There is one pre-defined functionpalette in color.py: palette.BlackYellow
A more simplistic example is the following:
def red(x):
return x
def green(x):
return x
def blue(x):
return x
pal = color.functionpalette(functions={"r":red, "g":green, "b":blue}, type =
"rgb")
Here, {"r":red, "g":green, "b":blue} is a dictionary providing the
r,g,b functions to evaluate the colors depending on a single parameter
in the interval [0,1].
You can likewise use a dictionary with the keys c,m,y,k.
> The proximate reason I'm asking is that the default palettes are, well, kind
> of
> strong, and good graphs typically use more harmonious colors.
The BlackYellow palette is optimized to yield good results print out
in grayscales (this is especially important when publishing in
color-online scientific journals)
> I'd like to see
> PyX use and support the ColorBrewer (colorbrewer.org) schemes for colors, and
> functionpalette is perfect for this, and if I can get an example of how it's
> used I'll try it out.
If you have a palette of general interest, please do not hesitate to
suggest it. We will consider to take it into PyX.
Michael.
--
"A mathematician is a device for turning coffee into theorems"
Paul Erdös.
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user