Lines Matching defs:data
58 # The input data format does not match the data format that the
60 # from input data format to chart data format depends on the
61 # dimensionality of the input data. Check here for the
62 # dimensionality and correctness of the input data
63 def set_data(self, data):
64 if data is None:
69 data = array(data)
70 dim = len(shape(data))
72 raise AttributeError, "Input data must be a 1, 2, or 3d matrix"
73 self.inputdata = data
75 # If the input data is a 1d matrix, then it describes a
78 self.chartdata = array([[data]])
80 # If the input data is a 2d matrix, then it describes a bar
84 self.chartdata = transpose([data], axes=(2,0,1))
86 # If the input data is a 3d matrix, then it describes an array
90 self.chartdata = transpose(data, axes=(1,2,0))
95 data = property(get_data, set_data)
123 # Graph the chart data.
132 # data set and how it gets plotted as a result.
134 # e.g. data = [[[10,11,12], [13,14,15], [16,17,18], [19,20,21]],
158 raise AttributeError, 'Dimensions of error and data do not match'
273 data = array(self.inputdata)
274 dim = len(data.shape)
279 f.write(', '.join([ '%f' % val for val in data]) + '\n')
283 for i,row in enumerate(data):
309 # generate a data matrix of the given shape
311 #data = [ random.randrange(size - i) + 10 for i in xrange(size) ]
312 data = [ float(i)/100.0 for i in xrange(size) ]
313 data = reshape(data, myshape)
318 chart1.data = data
335 chart2.data = data