Lines Matching full:pl

301 	struct plot *pl;  in SetupPlot()  local
303 pl = &plot; in SetupPlot()
304 pl->width = width; in SetupPlot()
305 pl->height = 0; in SetupPlot()
306 pl->data = NULL; in SetupPlot()
307 pl->bar = NULL; in SetupPlot()
308 pl->separate_bars = separate; in SetupPlot()
309 pl->num_datasets = num_datasets; in SetupPlot()
310 pl->min = 999e99; in SetupPlot()
311 pl->max = -999e99; in SetupPlot()
317 struct plot *pl; in AdjPlot() local
319 pl = &plot; in AdjPlot()
320 if (a < pl->min) in AdjPlot()
321 pl->min = a; in AdjPlot()
322 if (a > pl->max) in AdjPlot()
323 pl->max = a; in AdjPlot()
324 pl->span = pl->max - pl->min; in AdjPlot()
325 pl->dx = pl->span / (pl->width - 1.0); in AdjPlot()
326 pl->x0 = pl->min - .5 * pl->dx; in AdjPlot()
341 struct plot *pl; in PlotSet() local
348 pl = &plot; in PlotSet()
349 if (pl->span == 0) in PlotSet()
352 if (pl->separate_bars) in PlotSet()
357 if (pl->bar == NULL) { in PlotSet()
358 pl->bar = calloc(pl->num_datasets, sizeof(char *)); in PlotSet()
359 assert(pl->bar != NULL); in PlotSet()
362 if (pl->bar[bar] == NULL) { in PlotSet()
363 pl->bar[bar] = malloc(pl->width); in PlotSet()
364 assert(pl->bar[bar] != NULL); in PlotSet()
365 memset(pl->bar[bar], 0, pl->width); in PlotSet()
373 x = (ds->points[n] - pl->x0) / pl->dx; in PlotSet()
384 if (m > pl->height) { in PlotSet()
385 pl->data = realloc(pl->data, pl->width * m); in PlotSet()
386 assert(pl->data != NULL); in PlotSet()
387 memset(pl->data + pl->height * pl->width, 0, in PlotSet()
388 (m - pl->height) * pl->width); in PlotSet()
390 pl->height = m; in PlotSet()
393 x = (ds->points[n] - pl->x0) / pl->dx; in PlotSet()
400 pl->data[j * pl->width + x] |= val; in PlotSet()
405 x = ((av - sd) - pl->x0) / pl->dx; in PlotSet()
406 m = ((av + sd) - pl->x0) / pl->dx; in PlotSet()
407 pl->bar[bar][m] = '|'; in PlotSet()
408 pl->bar[bar][x] = '|'; in PlotSet()
410 if (pl->bar[bar][z] == 0) in PlotSet()
411 pl->bar[bar][z] = '_'; in PlotSet()
413 x = (Median(ds) - pl->x0) / pl->dx; in PlotSet()
414 pl->bar[bar][x] = 'M'; in PlotSet()
415 x = (av - pl->x0) / pl->dx; in PlotSet()
416 pl->bar[bar][x] = 'A'; in PlotSet()
422 struct plot *pl; in DumpPlot() local
426 pl = &plot; in DumpPlot()
427 if (pl->span == 0) { in DumpPlot()
433 for (i = 0; i < pl->width; i++) in DumpPlot()
437 for (z = 1; z < pl->height; z++) { in DumpPlot()
439 for (j = 0; j < pl->width; j++) { in DumpPlot()
440 k = pl->data[(pl->height - z) * pl->width + j]; in DumpPlot()
449 for (i = 0; i < pl->num_datasets; i++) { in DumpPlot()
450 if (pl->bar[i] == NULL) in DumpPlot()
453 for (j = 0; j < pl->width; j++) { in DumpPlot()
454 k = pl->bar[i][j]; in DumpPlot()
463 for (i = 0; i < pl->width; i++) in DumpPlot()