Damiano: fixed internal conflict plus added the possibility of declaring
functions for pgfplots