The pgfplots package for plotting functions and the standalone package for displaying the graph in a single document need to be installed manually as they are not currently present in the Ubuntu repositories:

Shell

1

2

3

4

5

6

7

8

9

10

11

12

13

14

# navigate to your local texmf folder (could also be ~/texmf or ~/.texmf)