Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
plots.h
Go to the documentation of this file.
1 /**
2  * @file plots.h Contains declarations for utility functions for outputing to
3  * plotting programs.
4  */
5 // Copyright 2001 California Institute of Technology
6 
7 #ifndef CT_PLOTS_H
8 #define CT_PLOTS_H
9 
10 #include "cantera/base/Array.h"
12 
13 #include <fstream>
14 
15 namespace Cantera
16 {
17 //! Write a Plotting file
18 /*!
19  * @param fname Output file name
20  * @param fmt Either TEC or XL or CSV
21  * @param plotTitle Title of the plot
22  * @param names vector of variable names
23  * @param data N x M data array.
24  * data(n,m) is the m^th value of the n^th variable.
25  */
26 void writePlotFile(const std::string& fname, const std::string& fmt,
27  const std::string& plotTitle, const std::vector<std::string> &names,
28  const Array2D& data);
29 
30 //! Write a Tecplot data file.
31 /*!
32  * @param s output stream
33  * @param title plot title
34  * @param names vector of variable names
35  * @param data N x M data array.
36  * data(n,m) is the m^th value of the n^th variable.
37  */
38 void outputTEC(std::ostream& s, const std::string& title,
39  const std::vector<std::string>& names,
40  const Array2D& data);
41 
42 //! Write an Excel spreadsheet in 'csv' form.
43 /*!
44  * @param s output stream
45  * @param title plot title
46  * @param names vector of variable names
47  * @param data N x M data array.
48  * data(n,m) is the m^th value of the n^th variable.
49  */
50 void outputExcel(std::ostream& s, const std::string& title,
51  const std::vector<std::string>& names,
52  const Array2D& data);
53 }
54 
55 #endif
static std::string fmt(const std::string &r, size_t n)
void writePlotFile(const std::string &fname, const std::string &fmt, const std::string &plotTitle, const std::vector< std::string > &names, const Array2D &data)
Write a Plotting file.
Definition: plots.cpp:13
Header file for class Cantera::Array2D.
void outputExcel(std::ostream &s, const std::string &title, const std::vector< std::string > &names, const Array2D &data)
Write an Excel spreadsheet in 'csv' form.
Definition: plots.cpp:59
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
void outputTEC(std::ostream &s, const std::string &title, const std::vector< std::string > &names, const Array2D &data)
Write a Tecplot data file.
Definition: plots.cpp:35