Cantera  2.5.1
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 
6 // This file is part of Cantera. See License.txt in the top-level directory or
7 // at https://cantera.org/license.txt for license and copyright information.
8 
9 #ifndef CT_PLOTS_H
10 #define CT_PLOTS_H
11 
12 #include "cantera/base/Array.h"
14 
15 #include <fstream>
16 
17 namespace Cantera
18 {
19 //! Write a Plotting file
20 /*!
21  * @param fname Output file name
22  * @param fmt Either TEC or XL or CSV
23  * @param plotTitle Title of the plot
24  * @param names vector of variable names
25  * @param data N x M data array.
26  * data(n,m) is the m^th value of the n^th variable.
27  */
28 void writePlotFile(const std::string& fname, const std::string& fmt,
29  const std::string& plotTitle, const std::vector<std::string> &names,
30  const Array2D& data);
31 
32 //! Write a Tecplot data file.
33 /*!
34  * @param s output stream
35  * @param title plot title
36  * @param names vector of variable names
37  * @param data N x M data array.
38  * data(n,m) is the m^th value of the n^th variable.
39  */
40 void outputTEC(std::ostream& s, const std::string& title,
41  const std::vector<std::string>& names,
42  const Array2D& data);
43 
44 //! Write an Excel spreadsheet in 'csv' form.
45 /*!
46  * @param s output stream
47  * @param title plot title
48  * @param names vector of variable names
49  * @param data N x M data array.
50  * data(n,m) is the m^th value of the n^th variable.
51  */
52 void outputExcel(std::ostream& s, const std::string& title,
53  const std::vector<std::string>& names,
54  const Array2D& data);
55 }
56 
57 #endif
Header file for class Cantera::Array2D.
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:264
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
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:15
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
Versions 6.2.0 and 6.2.1 of fmtlib do not include this define before they include windows....
Definition: fmt.h:35