21 canvas - Controlling output file and format
Description: canvas - Controlling output file and format
Keywords: pychart

# 21 `canvas` - Controlling output file and format

class `canvas.T`
  Canvas is an object that corresponds to a single output file. It provides a set of methods for drawing lines, polygons, texts, and other things in a manner independent of the file's format. Canvas is usually hidden from the user, as PyChart creates a "default" canvas when it starts up and implicitly writes all charts on the default canvas (unless the user specifies otherwise; more on that later). There are some occasions, however, in which you might want to manipulate a canvas explicitly, e.g., when you want to create multiple graphs from a single file, or you just want to add lines and texts directly.

  Class `canvas.T` is an abstract base class. PyChart provides several subclasses that correspond to specific file formats. For example, `pscanvas.T` implements methods for PostScript output. Class `pdfcanvas.T` implements methods for PDF output. format

Subsections

- 21.1 Creating a canvas
- 21.2 Drawing graphs on canvas
- 21.3 Drawing other objects on canvas
- 21.4 Clipping
- 21.5 Setting canvas properties
- 21.6 Shortcut functions for the default canvas