Skip to content

GraphManager Class

The GraphManager class gives access to the PrestoPlot opened graphs. You'll be able to fetch an object of the last created graph, as well as create or delete them.

Events also exist when graphs are created or deleted.

Public Functions

createGraph{ dataset ... }
deleteGraph{ graph }
getAllGraphs{}
getLastGraph{}

Public Callbacks

onGraphCreated{ graph }
onGraphDeleted{ graph }


Detailed Function Descriptions

createGraph

createGraph{ dataset ... }

Create a new graph with given datasets on it.

Parameters :

  • dataset : A dataset name or a Dataset object.

  • ... : others dataset names or Dataset objects.

Return : A new Graph object of the just created graph.

deleteGraph

deleteGraph{ graph }

Delete a graph.

Parameters :

  • graph : The Graph object to delete

getAllGraphs

getAllGraphs{ }

Return all opened graphs.

Return : A list of Graph objects.

getLastGraph

getLastGraph{ }

Return the last created graph. The last created is the one on which command lines would apply.

Return : A Graph object of the last created graph, or empty string if any.


Detailed Callback Descriptions

onGraphCreated

onGraphCreated{ graph }

This function let you execute some code when a graph is created in PrestoPlot (new graph or loaded graph from PMD or PGR).

Parameters :

  • graph : The newly created Graph object.

onGraphDeleted

onGraphDeleted{ graph }

This function let you execute some code when a graph is deleted in PrestoPlot

Parameters :

  • graph : The graph object being deleted.