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)

enter image description here

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

enter image description here

and turns into,

enter image description here


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -