python - imshow with non-orthogonal axes (i.e. parallelogram ) -
i have 2d array of data sampled along 2 vectors non-orthogonal a, b
a = |a|.( cos(alfa), sin(alfa) )
b = |b|.( cos(beta), sin(beta) )
(i.e not along orthogonal cartesian direction x, y)
i plot data un-distorted (i.e. parallelogram instead of rectangle)
is there function in matplotlib?
i need plotting data (c, f , i)

what using affine transform in example,
import numpy np import matplotlib.pyplot plt import matplotlib.transforms mtransforms def get_image(): scipy import misc z = misc.imread('31271907.jpg') return z # image fig, ax = plt.subplots(1,1) z = get_image() # image skew im = ax.imshow(z, interpolation='none', origin='lower', extent=[-2, 4, -3, 2], clip_on=true) im._image_skew_coordinate = (3, -2) plt.show() which uses image

and turns into,

Comments
Post a Comment