plots.h

Go to the documentation of this file.
00001 /**
00002  *  @file plots.h
00003  *       Contains declarations for utility functions for
00004  *   outputing to plotting programs.
00005  */
00006 
00007 /*
00008  * $Revision: 368 $
00009  * $Date: 2010-01-03 19:46:26 -0500 (Sun, 03 Jan 2010) $
00010  */
00011 
00012 // Copyright 2001  California Institute of Technology
00013 
00014 #ifndef CT_PLOTS_H
00015 #define CT_PLOTS_H
00016 
00017 
00018 #include "Array.h"
00019 #include "ctexceptions.h"
00020 
00021 #include <vector>
00022 #include <string>
00023 #include <fstream>
00024 
00025 namespace Cantera {
00026 
00027 
00028   //!    Write a Plotting file
00029   /*!
00030    * @param fname      Output file name
00031    * @param fmt        Either TEC or XL or CSV
00032    * @param plotTitle  Title of the plot
00033    * @param names      vector of variable names 
00034    * @param data       N x M data array. 
00035    *                     data(n,m) is the m^th value of the n^th variable.
00036    */
00037   void writePlotFile(const std::string &fname, const std::string &fmt, 
00038                      const std::string &plotTitle, const std::vector<std::string> &names,
00039                      const Array2D& data);
00040 
00041    
00042   //!    Write a Tecplot data file.
00043   /*!
00044    * @param s        output stream 
00045    * @param title    plot title 
00046    * @param names    vector of variable names 
00047    * @param data      N x M data array. 
00048    *                 data(n,m) is the m^th value of the n^th variable.
00049    */
00050   void outputTEC(std::ostream &s, const std::string &title, 
00051                  const std::vector<std::string>& names,  
00052                  const Array2D& data);
00053 
00054   
00055   //! Write an Excel spreadsheet in 'csv' form.  
00056   /*!
00057    * @param s          output stream 
00058    * @param title      plot title 
00059    * @param names      vector of variable names
00060    * @param data       N x M data array.
00061    *                        data(n,m) is the m^th value of the n^th variable.
00062    */
00063   void outputExcel(std::ostream &s, const std::string &title, 
00064                    const std::vector<std::string>& names,  
00065                    const Array2D& data);
00066 }
00067 
00068 #endif
Generated by  doxygen 1.6.3