Hello All, I have an issue with the pick event where when the zoom tool is used and then the pick event is fired, the event.ind returns the number of indexes which are visible between the zoomed xlim min and max, however the line.get_xdata() returns all of the xdata values. The issue is that the index of the xdata and the returned index do not match
here is an example of the output xbound (0.4049505073424931, 0.66117278529306056) #the xbound values as seen on the screen index [33] #the picked index xdata [ 0.00416667 0.0083 0.0125 0.01673333 0.02093333 0.02516667 0.02936667 0.0336 0.0378 0.04203333 0.04623333 0.05043333 0.05466667 0.05886667 0.06306667 0.0673 0.0715 0.0757 0.07993333 0.08416667 0.08836667 0.0926 0.09683333 0.10103333 0.10523333 0.10946667 0.1137 0.11793333 0.12216667 0.12636667 0.1306 0.13483333 0.13903333 0.14323333 0.14746667 0.15166667 0.1559 0.1601 0.16433333 0.16853333 0.17276667 0.17696667 0.1812 0.1854 0.1896 0.19383333 0.19806667 0.2023 0.2065 0.21073333 0.21493333 0.21913333 0.22336667 0.22756667 0.2318 0.23603333 0.24023333 0.24446667 0.2488 0.25303333 0.25726667 0.26146667 0.2657 0.26993333 0.2742 0.27843333 0.28263333 0.28686667 0.29106667 0.2953 0.2995 0.3037 0.30793333 0.31216667 0.31636667 0.3206 0.3248 0.329 0.33323333 0.33743333 0.34166667 0.3459 0.3501 0.35433333 0.35853333 0.36273333 0.36696667 0.3712 0.37543333 0.37963333 0.38383333 0.38806667 0.39226667 0.39646667 0.4007 0.40493333 0.40916667 0.4134 0.41766667 0.42186667 0.4261 0.43033333 0.43456667 0.43876667 0.44296667 0.4472 0.4514 0.45563333 0.45986667 0.4641 0.46833333 0.47256667 0.47676667 0.481 0.48523333 0.48946667 0.4937 0.49793333 0.50213333 0.50636667 0.5106 0.5148 0.51903333 0.52326667 0.52746667 0.5317 0.53593333 0.54016667 0.5444 0.54863333 0.55283333 0.55706667 0.5613 0.5655 0.56973333 0.574 0.57823333 0.58246667 0.58666667 0.5909 0.59513333 0.59933333 0.60353333 0.60776667 0.61196667 0.6162 0.6204 0.62463333 0.62886667 0.6331 0.6373 0.6415 0.64573333 0.64993333 0.65416667 0.6584 0.6639 0.66846667 0.67316667 0.67816667 0.6824 0.68663333 0.69083333 0.69623333 0.70046667 0.70466667 0.70886667 0.71426667 0.71846667 0.7236 0.72783333 0.7322 0.7367 0.7412 0.74543333 0.74963333 0.75386667 0.7581 0.76233333 0.76653333 0.77076667 0.77496667 0.7792 0.78343333 0.78766667 0.7919 0.7961 0.80033333 0.80456667 0.8088 0.813 0.81723333 0.82146667 0.82566667 0.8299 0.8341 0.83833333 0.84256667 0.84676667 0.85096667 0.8552 0.85943333 0.86363333 0.86786667 0.8721 ] #the data in my x axis xdata[index] [ 0.14323333] ydata[index] [ 0.04673034] #the data returned from the pick event as can be seen the data on the screen is limited to the xbound, and the picked data is index 33 of the entire xdata (and ydata) is there a simple command that only picks the data from the xbound values and not the entire xdata? pls healp -- View this message in context: http://old.nabble.com/how-do-you-pick-the-data-values-from-a-line-that-has-been-zoomed-in-tp32788725p32788725.html Sent from the matplotlib - users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users