Cantera  2.0
plots.h
Go to the documentation of this file.
1 /**
2  * @file plots.h
3  * Contains declarations for utility functions for
4  * outputing to plotting programs.
5  */
6 // Copyright 2001 California Institute of Technology
7 
8 #ifndef CT_PLOTS_H
9 #define CT_PLOTS_H
10 
11 
12 #include "cantera/base/Array.h"
14 
15 #include <vector>
16 #include <string>
17 #include <fstream>
18 
19 namespace Cantera
20 {
21 
22 
23 //! Write a Plotting file
24 /*!
25  * @param fname Output file name
26  * @param fmt Either TEC or XL or CSV
27  * @param plotTitle Title of the plot
28  * @param names vector of variable names
29  * @param data N x M data array.
30  * data(n,m) is the m^th value of the n^th variable.
31  */
32 void writePlotFile(const std::string& fname, const std::string& fmt,
33  const std::string& plotTitle, const std::vector<std::string> &names,
34  const Array2D& data);
35 
36 
37 //! Write a Tecplot data file.
38 /*!
39  * @param s output stream
40  * @param title plot title
41  * @param names vector of variable names
42  * @param data N x M data array.
43  * data(n,m) is the m^th value of the n^th variable.
44  */
45 void outputTEC(std::ostream& s, const std::string& title,
46  const std::vector<std::string>& names,
47  const Array2D& data);
48 
49 
50 //! Write an Excel spreadsheet in 'csv' form.
51 /*!
52  * @param s output stream
53  * @param title plot title
54  * @param names vector of variable names
55  * @param data N x M data array.
56  * data(n,m) is the m^th value of the n^th variable.
57  */
58 void outputExcel(std::ostream& s, const std::string& title,
59  const std::vector<std::string>& names,
60  const Array2D& data);
61 }
62 
63 #endif