Commit 812c81fb authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

plot labels only if reasonable

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 4555
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent a8fce93c
......@@ -92,12 +92,18 @@ void gnuplotplot(std::ostream& os,
os << "set yrange [" << -0.05 * maxval << ":" << 1.05*maxval << "]\n";
os << "plot ";
bool printlabels=(cb.nbins()<20);
// setup plot command
I=vog.begin();
while (I!=vog.end())
{
os << "\'-\' using 1:3 title \"" << I->ID.ID << "\" with boxes, \\\n";
os << " \'-\' using 1:3:2 with labels center offset 0,-0.8 notitle";
os << "\'-\' using 1:3 title \"" << I->ID.ID << "\" with boxes";
if (printlabels)
{
os << ", \\\n";
os << " \'-\' using 1:3:2 with labels center offset 0,-0.8 notitle";
}
++I;
if (I!=vog.end())
{
......@@ -110,13 +116,15 @@ void gnuplotplot(std::ostream& os,
}
// setup data
unsigned int nperstream=1;
if (printlabels) { nperstream=2; }
I=vog.begin();
while (I!=vog.end())
{
GapSeries gs=seriesofmissingsamples(*I, cb);
for (unsigned int i=0; i<2; ++i)
for (unsigned int i=0; i<nperstream; ++i)
{
for (unsigned j=0; j<cb.nbins(); ++j)
for (unsigned int j=0; j<cb.nbins(); ++j)
{
libtime::TAbsoluteTime time=cb.bin(j)+cb.binsize()/2;
os << time.hierarchicalstring()
......@@ -124,7 +132,7 @@ void gnuplotplot(std::ostream& os,
}
os << "e\n";
}
for (unsigned j=0; j<cb.nbins(); ++j)
for (unsigned int j=0; j<cb.nbins(); ++j)
{
total(j)-=gs.gapseries(j);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment