comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Automated Map colors
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Automated Map colors [message #81045] Tue, 31 July 2012 03:42
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
You could make an implementation of this...

http://en.wikipedia.org/wiki/Four_color_theorem

cheers,
Greg
Re: Automated Map colors [message #81048 is a reply to message #81045] Mon, 30 July 2012 15:58 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Wayne Landsman writes:

> I have a program that creates connected filled polygons
> It ends up looking like a map where each country is
> in a different color (or at least countries that
> border on each other have a different color).

> Right now I choose my colors by getting an array of
> color names from cgcolor(/names), and randomly
> assigning a color to each polygon. Sometimes this
> looks OK, and sometimes it looks, um, like the
> colors were chosen at random. Anyone have any
> suggestions on how to intelligently pick colors
> for a map?

I think I would probably stick to one of the Brewer
color tables, which were made specifically to look
good on maps:

http://colorbrewer2.org/

I'd probably down-sample to the number of colors I
needed, and pick randomly from that list. I'd probably
try Brewer color table 27 if I were going to start
somewhere:

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: if you are able to access the internet at your spare time and wish to earn some $100 - $200 per month, then you are landed at the right place. this community is for you only !!!
Next Topic: if you are able to access the internet at your spare time and wish to earn some $100 - $200 per month, then you are landed at the right place. this community is for you only !!!

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:36:15 PDT 2025

Total time taken to generate the page: 0.00561 seconds