Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
python display image with non-linear axes
import matplotlib.pyplot as plt
import numpy as np
x = np.logspace(1, 3, 5)
y = np.linspace(0, 2, 3)
z = np.linspace(0, 1, 4)
Z = np.vstack((z, z))
plt.imshow(Z, extent=[10, 1000, 0, 1], cmap='gray')
plt.axvline(100, color='red')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment