Lines Matching refs:x

97 def si(x):  argument
98 if x == 0:
101 p = 3*int(m.log(abs(x), 10**3))
104 s = '%.3f' % (abs(x) / (10.0**p))
110 return '%s%s%s' % ('-' if x < 0 else '', s, SI_PREFIXES[p])
113 def si2(x): argument
114 if x == 0:
117 p = 10*int(m.log(abs(x), 2**10))
120 s = '%.3f' % (abs(x) / (2.0**p))
126 return '%s%s%s' % ('-' if x < 0 else '', s, SI2_PREFIXES[p])
169 def dat(x): argument
171 if '/' in x:
172 x, _ = x.split('/', 1)
176 return int(x, 0)
182 return float(x)
184 if m.isinf(x) or m.isnan(x):
185 raise ValueError("invalid dat %r" % x)
190 raise ValueError("invalid dat %r" % x)
215 def dataset(results, x=None, y=None, define=[]): argument
225 if x is not None:
226 if x not in r:
229 x_ = dat(r[x])
254 def datasets(results, by=None, x=None, y=None, define=[]): argument
285 for x_ in (x if x is not None else [None]):
288 k_x = x_ if len(x or []) > 1 else ''
304 self.x = 0
332 x, y = i
333 if x < 0:
334 x += len(self.xweights)
338 return self.map[(x,y)]
371 if s.x+s.xspan-1 == new_i:
373 elif s.x > new_i:
374 s.x += 1
389 if s.x+s.xspan-1 == new_i:
391 elif s.x > new_i:
392 s.x += 1
427 self.map = self_map | {(x, y+len(self_yweights)): s
428 for (x, y), s in other_map.items()}
436 self.map = other_map | {(x, y+len(other.yweights)): s
437 for (x, y), s in self_map.items()}
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()}
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()}
566 x=None, argument
729 for k, vs in it.chain(by or [], x or [], y or [])))
732 if x is not None:
733 x = [k for k, _ in x]
741 datasets_ = datasets(results, by, x, y, define)
782 s.x
783 : s.x+s.xspan])
815 subdatasets = datasets(results, by, x, y, define_)
820 dats = sorted((x,y) for x,y in dataset.items())
821 ax.plot([x for x,_ in dats], [y for _,y in dats],
858 ax.xaxis.set_major_formatter(lambda x, pos:
859 si2(x)+(xunits_ if xunits_ else ''))
871 ax.xaxis.set_major_formatter(lambda x, pos:
872 si(x)+(xunits_ if xunits_ else ''))
884 ax.yaxis.set_major_formatter(lambda x, pos:
885 si2(x)+(yunits_ if yunits_ else ''))
897 ax.yaxis.set_major_formatter(lambda x, pos:
898 si(x)+(yunits_ if yunits_ else ''))
1001 fig.supxlabel(escape(xlabel), x=xmid)
1005 fig.suptitle(escape(title), x=xmid)
1048 type=lambda x: (
1050 )(*x.split('=', 1)),
1055 type=lambda x: (
1057 )(*x.split('=', 1)),
1063 type=lambda x: (
1065 )(*x.split('=', 1)),
1070 type=lambda x: (lambda k,v: (k, set(v.split(','))))(*x.split('=', 1)),
1084 type=lambda x: [x.strip() for x in x.split(',')],
1088 type=lambda x: [x.strip().replace('0',',') for x in x.split(',')],
1093 type=lambda x: int(x, 0),
1097 type=lambda x: int(x, 0),
1101 type=lambda x: tuple(
1102 dat(x) if x.strip() else None
1103 for x in x.split(',')),
1107 type=lambda x: tuple(
1108 dat(x) if x.strip() else None
1109 for x in x.split(',')),
1129 type=lambda x: int(x, 0) if ',' not in x
1130 else [dat(x) for x in x.split(',')],
1135 type=lambda x: int(x, 0) if ',' not in x
1136 else [dat(x) for x in x.split(',')],
1153 type=lambda x:
1154 [x.strip() for x in x.split(',')]
1155 if x.strip() else [],
1159 type=lambda x:
1160 [x.strip() for x in x.split(',')]
1161 if x.strip() else [],
1196 type=lambda x: [x.strip() for x in x.split(',')],