Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #27589

Re: color coding for numbers

From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: color coding for numbers
Date 2012-08-21 13:48 -0400
Organization > Bestiaria Support Staff <
References <57f81534-03af-475f-91c1-aee554e71ab6@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.3615.1345571283.4697.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, 21 Aug 2012 01:38:33 -0700 (PDT), namenobodywants@gmail.com
declaimed the following in gmane.comp.python.general:

> what is the best way of using color/shading on a tkinter canvas as a visualization for a two-dimensional grid of numbers? so far my best idea is to use the same value for R,G and B (fill = '#xyxyxy'), which gives shades of gray. if possible i'd like to have a larger number of visually distinct values. i've seen visualizations that seem to use some kind of hot-versus-cold color coding. does anybody know how to do this? thanks if you can help.
> 

	Last time I worked on something using a "temperature scale" it was
system with 8-10 bit planes using a color look-up table running from
dark blue through reds, greens, and finally white. Data values would be
mapped into the range of colors (32-64 depending on hardware; the other
bit planes were needed for annotations and windowing support, rather
than the color-coded data)

	On more modern 24-bit (or higher) systems, where each pixel is
directly specified... I suppose one could map the data value to the
H-component of HLS or HSV (0.0-1.0, or 0 to 360deg); then convert back
to RGB. I'd suggest using a range from 0 to 300deg to avoid confusion as
the higher "temps" start to shade back to the lowest.

	Strangely, while data plots tend to use dark blue for "cold" and red
for "hot", the color temperature of light is just the other -- dark red
is cold, and blue shading into white is hot.

-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

color coding for numbers namenobodywants@gmail.com - 2012-08-21 01:38 -0700
  Re: color coding for numbers Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-08-21 12:55 +0200
    Re: color coding for numbers DJC <djc@news.invalid> - 2012-08-21 19:07 +0200
      Re: color coding for numbers Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-08-22 12:56 +0200
  Re: color coding for numbers Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-21 13:48 -0400

csiph-web