source: subversion/applications/rendering/genericHeatmapRender/location.py @ 30554

Last change on this file since 30554 was 16116, checked in by stevefaeembra, 10 years ago

initial version.. very basic heatmapping code using Python/Matplotlib?

File size: 1.2 KB
Line 
1# -*- coding: UTF8 -*-
2'''
3    This program is free software; you can redistribute it and/or modify
4    it under the terms of the GNU General Public License as published by
5    the Free Software Foundation; either version 2 of the License, or
6    (at your option) any later version.
7
8    This program is distributed in the hope that it will be useful,
9    but WITHOUT ANY WARRANTY; without even the implied warranty of
10    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11    GNU General Public License for more details.
12
13    You should have received a copy of the GNU General Public License along
14    with this program; if not, write to the Free Software Foundation, Inc.,
15    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16'''
17
18
19class location(object):
20    '''
21    Represents a location with a latitude, longitude and
22    an arbitrary value (for example, number of views)
23    '''
24    def __init__(self,_name,_long,_lat,_val):
25        '''
26        Constructor
27        '''
28        self.name=_name
29        self.long=_long
30        self.lat=_lat
31        self.value=_val
32       
33    def __repr__(self):
34        return "%s (%.4f,%.4f) = %d" % (self.name,self.long,self.lat,self.value)
35   
Note: See TracBrowser for help on using the repository browser.