Alphabetical list Categories
yaxis Draw y-axis
Call signature:

yaxis(title='', ticks=None, labels=None, x=0, lim=None, flip=False, ticklen=None, axshift=None, lbldist=None, ttldist=None, titlerot=None, microshift=False)

Help text:

All arguments are optional.
  title specifies title for axis.
  ticks specifies positions of ticks along axis. If None, ticks are inferred using sensibleticks. If [], no ticks are drawn.
  labels specifies labels to put by ticks. If None, tick coordinates are used. If [], no labels are drawn.
  x specifies intersect with x-axis in data coordinates. Default is zero. Set to None to automatically position to the left of the data.
  lim specifies bottom and top edges as a tuple or list. If None, lim is determined from ticks. If [], no line is drawn.
  flip, if nonzero, inverts the sign of the settings from ticklen, textdist, and axshift. If flip=2, the title is flipped as well.
  ticklen and axshift override the values from the corresponding command.
  lbldist and ttldist override the values from textdist.
  titlerot overrides the value from ytitlerot.
  microshift, if True, specifies that the ticks are to be shifted by up to half a linewidth so they don't protrude vertically past the ends of an image. May also be a 2-ple specifying behavior for the bottom and top ends separately.
Either ticks or labels (but not both) may be a function, in which case the labels are calculated from the tick positions (or vice versa). For example:

  yaxis('Value (%)', labels=np.arange(0,101,25), ticks=lambda x: x/100)

Without any arguments or with just a title as an argument, yaxis tries to determine sensible defaults based on previous calls to plot and friends. Your mileage may vary.

Example:

import qplot as qp

import numpy as np

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

qp.yaxis('Numbers', np.arange(6))

qp.yaxis('', np.arange(6), ['zero', 'one', 'two', 'three', 'four', 'five'], x=1)

qp.yaxis('', np.arange(6), [], x=2)

qp.yaxis('right orientation', np.arange(6), flip=True, x=3)

qp.yaxis('flipped title', np.arange(1,5), lim=[0,5], flip=2, x=4)

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