Alphabetical list Categories
ylim Set y-axis limits
Call signature:

ylim(y0=None, y1=None)

Help text:

ylim(y0, y1) or ylim([y0, y1]) sets y-axis limits in the current panel.
This means that data outside of that range are not included in calculations for shrink. It does not mean that such data are not plotted.

Example:

import qplot as qp

import numpy as np

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

qp.pen('777')

qp.panel('A', (30, 20, 3*72-40, 1.5*72-40))

qp.pen('k')

xx = np.linspace(0, 2*np.pi, 50)

qp.plot(xx, np.sin(xx))

qp.yaxis()

qp.ylim(-2, 1.5)

qp.pen('777')

qp.panel('B', (30, 20+1.5*72, 3*72-40, 1.5*72-40))

qp.pen('k')

qp.plot(xx, np.sin(xx))

qp.yaxis()

qp.ylim(-.8, .8)

qp.panel('-')

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