Skip to content

Graph Class

The Graph class represents a graph loaded and displayed in PrestoPlot. It gives access to some methods to alter the graph.

Public Functions

addDataset{ datasets ... }
getDatasets{ datasets ... }
removeDataset{ datasets ... }
resetZoom{}
saveAsImage{ filename size }
spreadAxes{}


Detailed Function Descriptions

addDataset

addDataset{ datasets ... }

Add a dataset to the graph.

Parameters :

  • datasets : The dataset name or Dataset object to add.

  • ... : Other dataset names or Dataset objects to add.

getDatasets

getDatasets{ datasets ... }

Return the list of datasets being part of the graph.

Parameters :

  • datasets : The dataset name or Dataset object to remove.

  • ... : Other dataset names or Dataset objects to remove.

Return : A list of Dataset objects being part of the graph.

removeDataset

removeDataset{ datasets ... }

Remove a dataset from the graph. The dataset will remain loaded in PrestoPlot.

Parameters :

  • datasets : The dataset name or Dataset object to remove.

  • ... : Other dataset names or Dataset objects to remove.

resetZoom

resetZoom{ }

Reset all axis and zooming of the graph.

saveAsImage

saveAsImage{ filename size }

Save the graph as an image file.

Parameters :

  • filename : The filename to save the image to. The image format is deduced from the file extension. It can be png, gif or eps. On windows it can also be emf. On linux, it can also be ps.

  • size : (Optional) The size of the image to produce.

spreadAxes

spreadAxes{ }

Reset all axis and zooming of the graph.