Alphabetical list Categories
xtransform Specify a transformation to be applied to all x-data
Call signature:

xtransform(foo=None)

Help text:

xtransform(foo), where foo is a callable that accepts numpy arrays, specifies a transformation to apply to all x-data. xtransform(None) reverts to linear plotting.

The transformation applies to coordinates passed into commands like plot, patch, at, xaxis, legopt, image, etc. It also applies to the absdata subcommand for gline and friends. However, it does not apply to the reldata or rotdata subcommands.

See also ytransform.

Example:

import qplot as qp

import numpy as np

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

xx = np.exp(np.random.randn(100))

yy = np.random.randn(100)

qp.xtransform(lambda x: np.log10(x))

qp.marker('o', 2)

qp.mark(xx, yy)

qp.xaxis(ticks=[.1, 1, 10], y=-3)

qp.minorticks(np.arange(.2,1,.1))

qp.minorticks(np.arange(2,10,1))

qp.yaxis(ticks=qp.arange(-2,2,1), x=np.exp(-3))

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