score:1

You could just use np.rot90():

import numpy as np
import matplotlib.pyplot as plt


arr = np.arange(6).reshape(2, 3)

fig, axs = plt.subplots(1, 2)

axs[0].imshow(arr.T, origin='lower')
axs[1].imshow(np.rot90(arr))

enter image description here


Related Query