[Numpy-discussion] The problem with arrays
yogesh karpate
yogeshkarpate@gmail....
Tue Sep 22 07:12:23 CDT 2009
I just tried your idea but the result is same. it didnt help .
2009/9/22 Nadav Horesh <nadavh@visionsense.com>
> A quick answer with going into the details of your code:
>
> try
> plt.plot(R_time,R_amp,'go',hold=1)
> (one line before the last)
>
> Nadav
>
> -----הודעה מקורית-----
> מאת: numpy-discussion-bounces@scipy.org בשם yogesh karpate
> נשלח: ג 22-ספטמבר-09 14:11
> אל: numpy-discussion@scipy.org
> נושא: [Numpy-discussion] The problem with arrays
>
> Please kindly go through following code snippet
> for i in range(a1):
> data_temp=(bpf[left[0][i]:right[0][i]])# left is an array and right
> is also an array
> maxloc=data_temp.argmax() #taking indices of max. value of
> data segment
> maxval=data_temp[maxloc]
> minloc=data_temp.argmin()
> minval=data_temp[minloc]
> maxloc = maxloc-1+left # add offset of present location
> minloc = minloc-1+left # add offset of present location
> R_index = maxloc
> R_t = t[maxloc]
> R_amp = array([maxval])
> S_amp = minval#%%% Assuming the S-wave is the lowest
> #%%% amp in the given window
> #S_t = t[minloc]
> R_time=array([R_t[0][i]])
> plt.plot(R_time,R_amp,'go');
> plt.show()
> The thing is that I want to plot R_time and R_amp in a single shot.The
> above
> code plots R_time and R_amp each time and overwriting previous value as
> the
> loop continues,i.e. it displays the many graphs each indicating single
> point (R_time,R_amp) as long as loop continues.What I want is that all
> points from R_time and R_amp should be plotted in one go. I tried to take
> array and store the value ,but it takes only one value at the end of
> loop.
> How should I break this loop?Can anybody help me out ????
> Thanx in Advance
> Regards
> Yogesh
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090922/d4c6891d/attachment.html
More information about the NumPy-Discussion
mailing list