13

Graphing Functions and Data

The best is the enemy of the good.

– Voltaire

If you are in any empirical field, you need to graph data. If you are in any field that uses math to model phenomena, you need to graph functions. This chapter discusses basic mechanisms for such graphics. As usual, we show the use of the mechanisms and also discuss their design. The key examples are graphing a function of one argument and displaying values read from a file.

§13.1 Introduction

§13.2 Graphing simple functions

§13.3 Function

Default arguments; More examples; Lambda expressions

§13.4 Axis

§13.5 Approximation

§13.6 Graphing data

Reading a file; General layout; Scaling data; Building the graph

13.1 Introduction

AA

Compared to the professional software systems ...

Get Programming: Principles and Practice Using C++, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.