/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013, by the GROMACS development team, led by
- * David van der Spoel, Berk Hess, Erik Lindahl, and including many
- * others, as listed in the AUTHORS file in the top-level source
- * directory and at http://www.gromacs.org.
+ * Copyright (c) 2010,2011,2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
*
* GROMACS is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* \ingroup module_analysisdata
* \author Teemu Murtola <teemu.murtola@gmail.com>
*/
-#include "gromacs/analysisdata/modules/plot.h"
+#include "gmxpre.h"
-#include <string>
-#include <vector>
+#include "plot.h"
#include <cstdio>
#include <cstring>
-#include <boost/shared_ptr.hpp>
+#include <string>
+#include <vector>
-#include "gromacs/legacyheaders/gmxfio.h"
-#include "gromacs/legacyheaders/oenv.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "gromacs/legacyheaders/xvgr.h"
+#include <boost/shared_ptr.hpp>
#include "gromacs/analysisdata/dataframe.h"
+#include "gromacs/fileio/gmxfio.h"
+#include "gromacs/fileio/xvgr.h"
+#include "gromacs/legacyheaders/oenv.h"
+#include "gromacs/math/vec.h"
#include "gromacs/options/basicoptions.h"
#include "gromacs/options/options.h"
#include "gromacs/options/timeunitmanager.h"
#include "gromacs/selection/selectioncollection.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/gmxassert.h"
+#include "gromacs/utility/programcontext.h"
#include "gromacs/utility/stringutil.h"
namespace
}
+void
+AbstractPlotModule::appendLegend(const std::string &setname)
+{
+ impl_->legend_.push_back(setname);
+}
+
+
void
AbstractPlotModule::setXFormat(int width, int precision, char format)
{
void
-AbstractPlotModule::dataStarted(AbstractAnalysisData * /*data*/)
+AbstractPlotModule::dataStarted(AbstractAnalysisData * /* data */)
{
if (!impl_->filename_.empty())
{
? static_cast<xvg_format_t>(impl_->settings_.plotFormat())
: exvgNONE);
output_env_t oenv;
- output_env_init(&oenv, 0, NULL, time_unit, FALSE, xvg_format, 0, 0);
+ output_env_init(&oenv, getProgramContext(), time_unit, FALSE, xvg_format, 0);
boost::shared_ptr<output_env> oenvGuard(oenv, &output_env_done);
impl_->fp_ = xvgropen(impl_->filename_.c_str(), impl_->title_.c_str(),
impl_->xlabel_.c_str(), impl_->ylabel_.c_str(),