in reply to Re^3: visualizing data in a table
in thread visualizing data in a table

Does that help?

Oh, absolutely! I have taken the code for colorRamp and am adapting it to my use. I have not just precip, but many different ecophysical variables, so I can use it for creating visualizations of all of them. My colorRamp itself is going to be customizable so that I will be able to specify starting and ending colors (kinda like I linked to at http://colorbrewer.org). This is truly great, and thanks and attribution goes to you, of course.

By the way, if you don't mind answering -- why do you have the colorRamp definition itself inside a BEGIN {} block?

--

when small people start casting long shadows, it is time to go to bed

Replies are listed 'Best First'.
Re^5: visualizing data in a table
by BrowserUk (Patriarch) on Mar 28, 2010 at 01:15 UTC
    why do you have the colorRamp definition itself inside a BEGIN {} block?

    Just to ensure that the lookup table is built before the sub can be called.

    That would take care of itself if it was in a module. But so far, everyone who's contacted me about the snippet has had a different set of requirements of it. Some want discrete rgbs; some rgba; some as html-style 3 or 6 hex digits; some want cmyk. Everyone seems to need to adapt it some way or another.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.