** Date Started: Dec 2000
**
** This is part of the CTSim program
-** Copyright (C) 1983-2000 Kevin Rosenberg
+** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: plotfile.cpp,v 1.10 2001/01/02 16:02:13 kevin Exp $
+** $Id$
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
}
void
-PlotFile::setCurveSize (int nCols, int nRecords)
+PlotFile::setCurveSize (int nCols, int nRecords, bool bScatterPlot)
{
m_iNumColumns = nCols;
m_iNumRecords = nRecords;
+ m_bScatterPlot = bScatterPlot;
m_vecCurves.clear();
m_vecCurves.reserve (m_iNumColumns * m_iNumRecords);
}
// Storage format
// a Column's records are stored sequentially. It begins at iCol * m_iNumRecords
-
bool
PlotFile::addColumn (int iCol, const double* const pdColData)
{
#ifdef MSVC
fstream fs (m_strFilename.c_str(), std::ios::in);
#else
- fstream fs (m_strFilename.c_str(), std::ios::in | std::ios::nocreate);
+ fstream fs (m_strFilename.c_str(), std::ios::in); // | std::ios::nocreate);
#endif
if (fs.fail()) {
for (unsigned int iDesc = 0; iDesc < m_vecStrDescriptions.size(); iDesc++)
os << m_vecStrDescriptions[iDesc] << "\n";
}
+
+void
+PlotFile::printHeadersBrief (std::ostream& os) const
+{
+ os << "EZSet Commands\n";
+ for (unsigned int iEZ = 0; iEZ < m_vecStrEzsetCommands.size(); iEZ++)
+ os << m_vecStrEzsetCommands[iEZ] << "; ";
+ if (m_vecStrEzsetCommands.size() > 0)
+ os << "\n";
+
+ os << "Descriptions\n";
+ for (unsigned int iDesc = 0; iDesc < m_vecStrDescriptions.size(); iDesc++)
+ os << m_vecStrDescriptions[iDesc] << "\n";
+}
+
+void
+PlotFile::printHeadersBrief (std::ostringstream& os) const
+{
+ os << "EZSet Commands\n";
+ for (unsigned int iEZ = 0; iEZ < m_vecStrEzsetCommands.size(); iEZ++)
+ os << m_vecStrEzsetCommands[iEZ] << "; ";
+ if (m_vecStrEzsetCommands.size() > 0)
+ os << "\n";
+
+ os << "Descriptions\n";
+ for (unsigned int iDesc = 0; iDesc < m_vecStrDescriptions.size(); iDesc++)
+ os << m_vecStrDescriptions[iDesc] << "\n";
+}