ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/osprai/osprai/trunk/vu_module.py
(Generate patch)
# Line 3 | Line 3
3   This uses the old Tk GUI toolkit.
4   Christopher Lausted, Institute for Systems Biology,
5   OSPRAI developers
6 < Last modified on 100413 (yymmdd)
6 > Last modified on 100416 (yymmdd)
7  
8   Example:
9   #import vu_module as vu
# Line 14 | Line 14
14   #vu.dualgraph(ba1, ba2, "Title")
15   #vu.scatterplot(ba1, t1, t2, t3, t4, title)
16   """
17 < __version__ = "100413"
17 > __version__ = "100416"
18  
19  
20   ## Import libraries
# Line 114 | Line 114
114   def btnNext():  
115      ## Show next six traces on the graph.
116      global ba0
117 <    x = max(roiList())+1
118 <    if ((x+6) > len(ba0.roi)): return
119 <    ba0.set_plot_list(range(x,x+6))
117 >    lo = max(roiList()) + 1
118 >    if (lo == len(ba0.roi)): return
119 >    lo = max(lo,0)
120 >    hi = lo + 6
121 >    hi = min(hi, len(ba0.roi))
122 >    ba0.set_plot_list(range(lo, hi))
123      show()
124      return
125      
126   def btnPrev():
127      ## Show the previous six traces on the graph.
128      global ba0
129 <    x = min(roiList())+1
130 <    if ((x-6) < 1): return
131 <    ba0.set_plot_list(range(x-6,x))
129 >    lo = min(roiList()) - 6
130 >    lo = max(lo,0)
131 >    hi = lo + 6
132 >    hi = min(hi, len(ba0.roi))
133 >    ba0.set_plot_list(range(lo, hi))
134      show()
135      return
136  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines