From: Florian L. <mai...@xg...> - 2013-03-31 14:59:04
|
Hello! I try to use a background image in my plot: import matplotlib.pyplot as plt im = plt.imread("WTunnel.png") plt.xlim([-3,4]) plt.ylim([-0.01,0.05]) plt.plot(some stuff) plt.imshow(im, aspect="auto", extent=(-5, 4, -0.01, 0.05)) This works more or less. As far as I understand the extent argument works as scaling factor. Is there a way to move the background picture? I need to exactly set the x position since the background image is associated with the x data from the plots. The origin argument seems to be promising, but it accepts only [None|‘upper’|‘lower’]. What is the best way to handle such a picture? Background: The data is pressure measurements over x. The background image shows the geometric features of the measured object. Exact x_0 and dx is crucial, y values of the picture just need to look good ;-) Thanks! Florian |