summaryrefslogtreecommitdiff
path: root/simpl/plot/colours.py
diff options
context:
space:
mode:
Diffstat (limited to 'simpl/plot/colours.py')
-rw-r--r--simpl/plot/colours.py23
1 files changed, 4 insertions, 19 deletions
diff --git a/simpl/plot/colours.py b/simpl/plot/colours.py
index b85d48d..5efc86b 100644
--- a/simpl/plot/colours.py
+++ b/simpl/plot/colours.py
@@ -1,19 +1,3 @@
-# Copyright (c) 2010 John Glover, National University of Ireland, Maynooth
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
# These colour maps are based on the colour schemes in gheat:
# http://code.google.com/p/gheat/
@@ -223,13 +207,15 @@ pbj_colours = [
[0.820, 0.357, 0.094]
]
+
def classic(heat):
if heat < 0.0:
return classic_colours[0]
elif heat > 1.0:
return classic_colours[-1]
else:
- return classic_colours[int(heat * (len(classic_colours)-1))]
+ return classic_colours[int(heat * (len(classic_colours) - 1))]
+
def pbj(heat):
if heat < 0.0:
@@ -237,5 +223,4 @@ def pbj(heat):
elif heat > 1.0:
return pbj_colours[-1]
else:
- return pbj_colours[int(heat * (len(pbj_colours)-1))]
-
+ return pbj_colours[int(heat * (len(pbj_colours) - 1))]