ALPS Home Libraries License Support People ALPS Web Site

PrevUpHomeNext

Class template Plot

alps::plot::Plot — a class describing a plot, consisting of a number of data sets

Synopsis

// In header: <alps/plot.h>

template<typename C> 
class Plot : public std::vector< Set< C > > {
public:
  // construct/copy/destruct
  Plot(std::string = "", alps::Parameters const & = alps::Parameters(), 
       bool = true);

  // public member functions
  Plot< C > & operator<<(const Set< C > &);
  Plot< C > & operator<<(const std::string &);
  const std::string & name() const;
  const std::string & xaxis() const;
  const std::string & yaxis() const;
  bool show_legend() const;
  void set_name(const std::string &);
  void set_labels(const std::string &, const std::string &);
  void show_legend(bool);
  int size() const;
  const Set< C > & operator[](int) const;
  Parameters const & parameters() const;
};

Description

Plot public construct/copy/destruct

  1. Plot(std::string name = "", alps::Parameters const & p = alps::Parameters(), 
         bool show_legend = true);
    Constructor of a plot.

    Parameters:

    name

    the title of the plot

    show_legend

    indicates whether a legend should be shown

Plot public member functions

  1. Plot< C > & operator<<(const Set< C > & s);
    add a set to the plot
  2. Plot< C > & operator<<(const std::string & name);
    set the title
  3. const std::string & name() const;
    get the title
  4. const std::string & xaxis() const;
    get the x-axis label
  5. const std::string & yaxis() const;
    get the y-axis label
  6. bool show_legend() const;
    will the legend be shown?
  7. void set_name(const std::string & name);
    set the name
  8. void set_labels(const std::string & xaxis, const std::string & yaxis);
    set the x- and y-axis labels
  9. void show_legend(bool show);
    set whether the legend should be shown
  10. int size() const;
    get the number of sets
  11. const Set< C > & operator[](int i) const;
    get the i-th set
  12. Parameters const & parameters() const;
Copyright © 1994, 2002-2005 Matthias Troyer, Synge Todo

PrevUpHomeNext