From: Wayne W. <sie...@sb...> - 2010-02-21 15:29:41
|
I find this puzzling. It seems as though the x,y points in some fashion can vary. plot(2.8,3.4) doesn't work in my program plot([2.8],[3.4]) does work plot((2.8,3.4)) apparently creates two points Here's code where I have had to make x,y each a list. I've made comments about the behavior of x,y fig = figure() ax1 = fig.add_subplot(111) v = (0, 640, 0, 480) # min, max on x and y ax1.plot(xy[:,0], xy[:,1]) # draw all the lines title(afname) ylabel('vertical pixels') xlabel('horizontal pixels') # An attempt to draw an easy large circle. It worked, but zoom moves the circle. 320,235 not locked # If use (320,235), then get two circles. # ax1.plot([320],[235], marker='o', mfc='y', ms=400) # draw large circle ax1.plot([xy[0,0]],[xy[0,1]],'gs') # place marker at start. Had to "list-ize" array columns, but seems right ax1.plot([xy[npts-1,0]], [xy[npts-1,1]],'rs') # mark it is a last frame. More list-izing, but seems right ax1.plot([xy[k_max,0]], [xy[k_max,1]], marker='+', mec='g', ms=15) # mark maximum dist frame. Same listizing # Next is required for what I'm pretty sure are float64 numbers ax1.plot([amax_x], [amax_y], marker='o', mec='m',ms=5) # mark max amplitude. ax1.axis(v) show() I think the zoom difficulty can be handled with patches. An area I have yet to probe. -- "There is nothing so annoying as to have two people talking when you're busy interrupting." -- Mark Twain |