Inheritance diagram for GraceTMPL::Graph:
Public Member Functions
|Graph (Save *saver, int logplot=0)|
|Initialize the graph with optional logplot preparation. |
|void||setGraph (int i)|
|Set the graph's number. |
|void||addData (Data *d)|
|Add a dataset to this graph. |
|std::vector< Data * > *||data ()|
|Returns all datasets of this graph. |
|void||setXOffset (double x)|
|Set the graph's x-offset. |
|void||setYOffset (double y)|
|Set the data's y-offset. |
|void||setScaling (double s)|
|Set a factor by which the data will be scaled. |
|Query the graph's x-offset. |
|Query the graph's y-offset. |
|Query the factor by which the data will be scaled. |
|Query if data will be corrected for logplots. |
|void||addParam (const std::string &name, double value)|
|Add a variable to the graph's local parameters. |
|void||saveprep (const StringVecMap *daSets)|
|Prepare graph for saving - ensures consistency. |
|void||saveinfo (FILE *f, const StringVec *daGraph=0, const StringVecMap *daSets=0, const StringVecMap *daStrings=0)|
|Save information strings info file. |
|void||savedata (FILE *f, StringMap *literalData, int dataonly=0)|
|Save all datasets linked to this graph. |
In the normal case of operation, this class would not be instantiated by the user. The preferred way to get a new graph object is to call GraceTMPL::Save::addData().
Also note that it's in the application's responsibility to clean up Data objects. Graph::~Graph() would not touch them!
Initialize the graph with optional logplot preparation.
The saver must be a GraceTMPL::Save instance. If it is omitted or given as 0 some things will not work as expected!
If logplot is specified as !=0 all datasets in the graph will be corrected for logarithmic plotting.
Save all datasets linked to this graph.
If dataonly is specified as !=0, no ' ...' will be used to address the target graph number. This is a mandatory behaviour for bare dataset saving.
Save information strings info file.
DaGraph contains the information strings relevant for this graph.
DaSet contains the information strings relevant for this dataset.
DaStrings containes the string definition templates used to format the graph's parameter strings.
If DaGraph is empty or a NULL pointer NO information is being written to the file. This is a mandatory behaviour for bare dataset saving.
Set the graph's number.
This method is used internally to set the graph's number corresponding to g0..gN.