#ifndef SCATTERPLOT_H #define SCATTERPLOT_H #include #include class ScatterplotWrapper; class Scatterplot { public: Scatterplot(); ~Scatterplot(); template void setNewData(Iterator begin, Iterator end); void setNewData(std::complex* data, int numPoints); void setNewData(std::complex* data, int numPoints); void setTitle(std::string title); void setXAxisScale(double xMin, double xMax); void setYAxisScale(double yMin, double yMax); void setXAxisAutoScale(bool on); void setYAxisAutoScale(bool on); void setAxisLabels(std::string xLabel, std::string yLabel); private: ScatterplotWrapper* plot_; }; template void Scatterplot::setNewData(Iterator begin, Iterator end) { int numPoints = end-begin; std::complex* data = new std::complex[numPoints]; for(int i=0;begin!=end;begin++,i++) { data[i] = *begin; } setNewData(data, numPoints); delete[] data; } #endif // SCATTERPLOT_H