本文整理汇总了C++中graph::xName方法的典型用法代码示例。如果您正苦于以下问题:C++ graph::xName方法的具体用法?C++ graph::xName怎么用?C++ graph::xName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类graph
的用法示例。
在下文中一共展示了graph::xName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: word
void Foam::gnuplotGraph::write(const graph& g, Ostream& os) const
{
os << "#set term postscript color" << endl
<< "set output \"" << word(g.title()) << ".ps\"" << endl
<< "set title " << g.title() << " 0,0" << endl << "show title" << endl
<< "set xlabel " << g.xName() << " 0,0" << endl << "show xlabel" << endl
<< "set ylabel " << g.yName() << " 0,0" << endl << "show ylabel" << endl
<< "plot";
bool firstField = true;
for (graph::const_iterator iter = g.begin(); iter != g.end(); ++iter)
{
if (!firstField)
{
os << ',';
}
firstField = false;
os << "'-' title " << iter()->name() << " with lines";
}
os << "; pause -1" << endl;
for (graph::const_iterator iter = g.begin(); iter != g.end(); ++iter)
{
os << endl;
writeXY(g.x(), *iter(), os);
}
}
示例2: forAllConstIter
void Foam::jplotGraph::write(const graph& g, Ostream& os) const
{
os << "# JPlot file" << nl
<< "# column 1: " << g.xName() << endl;
label fieldi = 0;
forAllConstIter(graph, g, iter)
{
os << "# column " << fieldi + 2 << ": " << (*iter()).name() << endl;
fieldi++;
}
示例3: forAllConstIter
void Foam::xmgrGraph::write(const graph& g, Ostream& os) const
{
os << "@title " << g.title() << nl
<< "@xaxis label " << g.xName() << nl
<< "@yaxis label " << g.yName() << endl;
label fieldI = 0;
forAllConstIter(graph, g, iter)
{
os << "@s" << fieldI << " legend "
<< iter()->name() << nl
<< "@target G0.S" << fieldI << nl
<< "@type xy" << endl;
writeXY(g.x(), *iter(), os);
os << endl;
fieldI++;
}
示例4: iter
void Foam::xmgrGraph::write(const graph& g, Ostream& os) const
{
os << "@title " << g.title() << endl
<< "@xaxis label " << g.xName() << endl
<< "@yaxis label " << g.yName() << endl;
label fieldI = 0;
for (graph::const_iterator iter = g.begin(); iter != g.end(); ++iter)
{
os << "@s" << fieldI << " legend "
<< iter()->name() << endl
<< "@target G0.S" << fieldI << endl
<< "@type xy" << endl;
writeXY(g.x(), *iter(), os);
os << endl;
fieldI++;
}
}