views:

127

answers:

2

Hi: I have a plot which has timestamps on the x-axis and some signal data on the y-axis. As a documentation I want to put timestamped pictures in relation to specific points in the plot. Is it possible to draw a line in a plot to a picture in a sequence of pictures below the plot?

+2  A: 

This demo from the matplotlib gallery shows how to insert pictures, draw lines to them, etc.

tom10
+2  A: 

If I understand the question correctly, then perhaps this may help:

import scipy
import pylab
fig = pylab.figure()
axplot = fig.add_axes([0.07,0.25,0.90,0.70])
axplot.plot(scipy.randn(100))
numicons = 8
for k in range(numicons):
    axicon = fig.add_axes([0.07+0.11*k,0.05,0.1,0.1])
    axicon.imshow(scipy.rand(4,4),interpolation='nearest')
    axicon.set_xticks([])
    axicon.set_yticks([])
fig.show()
fig.savefig('iconsbelow.png')

alt text

Steve