194 {
195 std::string dataFileName;
197 dataAndColorsAndLabels.size() ) );
198 size_t numberOfFiles( dataAndColorsAndLabels.size() );
199
200 std::vector< std::string > dataFileNames;
201 for( size_t whichEntry( 0 );
202 whichEntry < numberOfFiles;
203 ++whichEntry )
204 {
207 numberOfFileNumberDigits,
208 "" ) );
209 dataFileNames.push_back( dataFileName );
212
213 {
214 for( size_t dataIndex( 0 );
215 dataAndColorsAndLabels[ whichEntry ].first.size() > dataIndex;
216 ++dataIndex )
217 {
219 << dataAndColorsAndLabels[ whichEntry ].first[ dataIndex ].first
220 << " "
221 << dataAndColorsAndLabels[ whichEntry ].first[ dataIndex ].second
222 << std::endl;
223 }
225 }
226 else
227 {
228 std::cout
229 << std::endl
230 << "BOL::error! TwoDimensionalDataPlotter::plotData() could not open"
231 << dataFileName;
232 std::cout << std::endl;
233 }
234 }
235
238
239 {
241 << "set term postscript eps enhanced color solid" << std::endl
242 << "set ylabel \"" << yAxisLabel << "\"" << std::endl
243 << "set xlabel \"" << xAxisLabel << "\"" << std::endl
244 <<
"set output \"" <<
plotFileName <<
"\"" << std::endl;
245 for( size_t whichEntry( 0 );
246 whichEntry < numberOfFiles;
247 ++whichEntry )
248 {
250 << "set style line " << ( whichEntry + 1 ) << " lt rgb \""
251 << dataAndColorsAndLabels[ whichEntry ].second.first << "\" lw 3"
252 << std::endl;
253 }
255 << "plot ";
256 for( size_t whichEntry( 0 );
257 whichEntry < numberOfFiles;
258 ++whichEntry )
259 {
260 if( 0 < whichEntry )
261 {
263 }
265 << "'" << dataFileNames[ whichEntry ]
266 << "' index 0 title \""
267 << dataAndColorsAndLabels[ whichEntry ].second.second
268 << "\" with lines ls " << ( whichEntry + 1 );
269 }
271
273 }
274 else
275 {
276 std::cout
277 << std::endl
278 << "BOL::error! TwoDimensionalDataPlotter::plotData() could not open"
280 std::cout << std::endl;
281 }
282 }
static std::string intToString(int inputInt, int const minimumNumberOfDigits, std::string const prefixForPositiveNumbers="+", std::string const prefixForNegativeNumbers="-", char const paddingChar='0')
static int numberOfDigitsInInt(int inputInt)
bool forkAndExecvAndWait()