Lines Matching refs:s
104 s = '%.3f' % (abs(x) / (10.0**p))
105 s = s[:3+1]
107 if '.' in s:
108 s = s.rstrip('0')
109 s = s.rstrip('.')
110 return '%s%s%s' % ('-' if x < 0 else '', s, SI_PREFIXES[p])
120 s = '%.3f' % (abs(x) / (2.0**p))
121 s = s[:3+1]
123 if '.' in s:
124 s = s.rstrip('0')
125 s = s.rstrip('.')
126 return '%s%s%s' % ('-' if x < 0 else '', s, SI2_PREFIXES[p])
129 def escape(s): argument
130 return codecs.escape_decode(s.encode('utf8'))[0].decode('utf8')
348 other_xweights = [s*ratio for s in other_xweights]
370 for s in other.subplots:
371 if s.x+s.xspan-1 == new_i:
372 s.xspan += 1
373 elif s.x > new_i:
374 s.x += 1
388 for s in self.subplots:
389 if s.x+s.xspan-1 == new_i:
390 s.xspan += 1
391 elif s.x > new_i:
392 s.x += 1
417 self_yweights = [s*ratio for s in self.yweights]
421 for s in other.subplots:
422 s.y += len(self_yweights)
427 self.map = self_map | {(x, y+len(self_yweights)): s
428 for (x, y), s in other_map.items()}
430 for s in self.subplots:
431 s.y += len(other.yweights)
436 self.map = other_map | {(x, y+len(other.yweights)): s
437 for (x, y), s in self_map.items()}
446 other_yweights = [s*ratio for s in other_yweights]
468 for s in other.subplots:
469 if s.y+s.yspan-1 == new_i:
470 s.yspan += 1
471 elif s.y > new_i:
472 s.y += 1
486 for s in self.subplots:
487 if s.y+s.yspan-1 == new_i:
488 s.yspan += 1
489 elif s.y > new_i:
490 s.y += 1
515 self_xweights = [s*ratio for s in self.xweights]
519 for s in other.subplots:
520 s.x += len(self_xweights)
525 self.map = self_map | {(x+len(self_xweights), y): s
526 for (x, y), s in other_map.items()}
528 for s in self.subplots:
529 s.x += len(other.xweights)
534 self.map = other_map | {(x+len(other.xweights), y): s
535 for (x, y), s in self_map.items()}
539 self.xweights = [s*width for s in self.xweights]
540 self.yweights = [s*height for s in self.yweights]
772 + [max(s, 0.01) for s in reversed(grid.yweights)]
774 width_ratios=[max(s, 0.01) for s in grid.xweights]
778 for s in grid:
779 s.ax = fig.add_subplot(gs[
780 grid.height-(s.y+s.yspan) + (1 if legend_above else 0)
781 : grid.height-s.y + (1 if legend_above else 0),
782 s.x
783 : s.x+s.xspan])
786 for s in grid:
788 define_ = define + s.args.get('define', [])
789 xlim_ = s.args.get('xlim', xlim)
790 ylim_ = s.args.get('ylim', ylim)
791 xlog_ = s.args.get('xlog', False) or xlog
792 ylog_ = s.args.get('ylog', False) or ylog
793 x2_ = s.args.get('x2', False) or x2
794 y2_ = s.args.get('y2', False) or y2
795 xticks_ = s.args.get('xticks', xticks)
796 yticks_ = s.args.get('yticks', yticks)
797 xunits_ = s.args.get('xunits', xunits)
798 yunits_ = s.args.get('yunits', yunits)
799 xticklabels_ = s.args.get('xticklabels', xticklabels)
800 yticklabels_ = s.args.get('yticklabels', yticklabels)
803 subtitle = s.args.get('title')
804 xsublabel = s.args.get('xlabel')
805 ysublabel = s.args.get('ylabel')
818 ax = s.ax
928 for s in grid:
929 for h, l in zip(*s.ax.get_legend_handles_labels()):