# 4 Performing calculations

Often calculations need to be performed on data before they are plotted. This chapter and the next describe the mathematical environment which Pyxplot provides.

Most of the examples in this chapter act on single numerical values, displaying the results using the `print` command, demonstrating how Pyxplot may be used as a desktop calculator. The next chapter will extend this to use of Pyxplot’s mathematical environment to analyse whole datasets and produce plots.

- 4.1 Variables
- 4.2 Physical constants
- 4.3 Functions
  - 4.3.1 Spliced functions
- 4.4 Handling numerical errors
- 4.5 Working with complex numbers
- 4.6 Working with physical units
  - 4.6.1 Treatment of angles in Pyxplot
  - 4.6.2 Converting between different temperature scales
- 4.7 Configuring how numbers are displayed
  - 4.7.1 Display of physical units
  - 4.7.2 Changing the accuracy to which numbers are displayed
  - 4.7.3 Creating pastable text
- 4.8 Numerical integration and differentiation
- 4.9 Solving systems of equations
- 4.10 Searching for minima and maxima of functions
- 4.11 Working with time-series data
  - 4.11.1 Calendars
  - 4.11.2 Time intervals