Alphabetical list Categories
font Select font
Call signature:

font(family=None, size=None, bold=False, italic=False)

Help text:

font(...) selects a new font for QPlot.
The default font is Helvetica at 10 points.
All arguments are optional:
  family - Font family name (default: Helvetica)
  size - Font size in points (default: 10)
  bold - Select bold face if true
  italic - Select italic (or slanted) if true

Example:

import qplot as qp

import numpy as np

qp.figure('font', 3, 3)

qp.patch([0, 1, 1, 0], [0, 0, 1, 1])

qp.font('Helvetica', 10)

qp.at(.2, .2)

qp.text('Helvetica Roman')

qp.font('Times', 12, bold=True)

qp.at(.8, .8)

qp.text('Times Bold')

qp.font('BitstreamCharter', 12, italic=True)

qp.at(.2, .8)

qp.text('Charter Italic')

qp.font('Times', 12, italic=True)

qp.text('Times Italic', dy=14)

QPlot Documentation — (C) Daniel Wagenaar, 2014–2023