quickplot.h
1/***************************************************************************
2 *
3 * Copyright (C) 2002 by Willem van Straten
4 * Licensed under the Academic Free License version 2.1
5 *
6 ***************************************************************************/
7#include <vector>
8#include <algorithm>
9#include <cpgplot.h>
10
11template<class T>
12void quickplot (const std::vector<T>& vals)
13{
14 float xmin = 0;
15 float xmax = vals.size();
16
17 float ymin = *min_element(vals.begin(), vals.end());
18 float ymax = *max_element(vals.begin(), vals.end());
19
20 cpgswin (xmin, xmax, ymin, ymax);
21
22 cpgmove (0, vals[0]);
23
24 for (unsigned ipt=1; ipt< vals.size(); ipt++)
25 cpgdraw (ipt, vals[ipt]);
26
27}
28
29void quickimage (unsigned xdim, const std::vector<float>& vals);
30

Generated using doxygen 1.14.0