Lines Matching refs:self

135     def __init__(self, base, nbins=None):
137 self.base = float(base)
138 self.nbins = nbins
139 super().__init__(self.base)
141 def __call__(self):
143 vmin, vmax = self.axis.get_view_interval()
145 if self.nbins is not None:
146 nbins = self.nbins
148 nbins = np.clip(self.axis.get_tick_space(), 1, 9)
151 scale = self.base ** (m.ceil(m.log((vmax-vmin) / (nbins+1), self.base)))
152 self.set_params(scale)
303 def __init__(self, **args):
304 self.x = 0
305 self.y = 0
306 self.xspan = 1
307 self.yspan = 1
308 self.args = args
311 def __init__(self, subplot, width=1.0, height=1.0):
312 self.xweights = [width]
313 self.yweights = [height]
314 self.map = {(0,0): subplot}
315 self.subplots = [subplot]
317 def __repr__(self):
318 return 'Grid(%r, %r)' % (self.xweights, self.yweights)
321 def width(self):
322 return len(self.xweights)
325 def height(self):
326 return len(self.yweights)
328 def __iter__(self):
329 return iter(self.subplots)
331 def __getitem__(self, i):
334 x += len(self.xweights)
336 y += len(self.yweights)
338 return self.map[(x,y)]
340 def merge(self, other, dir):
343 self_xweights = self.xweights
366 for j in range(len(self.yweights)):
367 self_map[(new_i, j)] = self.map[(self_i, j)]
386 for j in range(len(self.yweights)):
387 self_map[(new_i, j)] = self.map[(self_i, j)]
388 for s in self.subplots:
401 for j in range(len(self.yweights)):
402 self_map[(new_i, j)] = self.map[(self_i, j)]
414 self_h = sum(self.yweights)
417 self_yweights = [s*ratio for s in self.yweights]
423 self.subplots.extend(other.subplots)
425 self.xweights = new_xweights
426 self.yweights = self_yweights + other.yweights
427 self.map = self_map | {(x, y+len(self_yweights)): s
430 for s in self.subplots:
432 self.subplots.extend(other.subplots)
434 self.xweights = new_xweights
435 self.yweights = other.yweights + self_yweights
436 self.map = other_map | {(x, y+len(other.yweights)): s
441 self_yweights = self.yweights
464 for j in range(len(self.xweights)):
465 self_map[(j, new_i)] = self.map[(j, self_i)]
484 for j in range(len(self.xweights)):
485 self_map[(j, new_i)] = self.map[(j, self_i)]
486 for s in self.subplots:
499 for j in range(len(self.xweights)):
500 self_map[(j, new_i)] = self.map[(j, self_i)]
512 self_w = sum(self.xweights)
515 self_xweights = [s*ratio for s in self.xweights]
521 self.subplots.extend(other.subplots)
523 self.xweights = self_xweights + other.xweights
524 self.yweights = new_yweights
525 self.map = self_map | {(x+len(self_xweights), y): s
528 for s in self.subplots:
530 self.subplots.extend(other.subplots)
532 self.xweights = other.xweights + self_xweights
533 self.yweights = new_yweights
534 self.map = other_map | {(x+len(other.xweights), y): s
538 def scale(self, width, height):
539 self.xweights = [s*width for s in self.xweights]
540 self.yweights = [s*height for s in self.yweights]
1222 def __call__(self, parser, namespace, value, option):
1227 self.__class__.parse(value)))