Changeset 319
- Timestamp:
- 11/11/08 12:32:37 (2 months ago)
- Files:
-
- trunk/src/plotting.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/plotting.py
r318 r319 75 75 Inputs: 76 76 progress - a float between 0. and 1. 77 78 Example: 79 >> progress_bar(0.7) 80 |=================================== | 77 81 """ 78 82 progressConditionStr = "ERROR: The argument of function NeuroTools.plotting.progress_bar(...) must be a float between 0. and 1.!" … … 126 130 xmin, xmax - the limits of the x axis 127 131 ymin, ymax - the limits of the y axis 132 133 Example: 134 >> x = range(10) 135 >> y = [] 136 >> for i in x: y.append(i*i) 137 >> pylab.plot(x,y) 138 >> plotting.set_axis_limits(pylab, 0., 10., 0., 100.) 128 139 """ 129 140 if hasattr(subplot, 'xlim'): … … 146 157 xlabel - a string for the x label 147 158 ylabel - a string for the y label 159 160 Example: 161 >> x = range(10) 162 >> y = [] 163 >> for i in x: y.append(i*i) 164 >> pylab.plot(x,y) 165 >> plotting.set_labels(pylab, 'x', 'y=x^2') 148 166 """ 149 167 if hasattr(subplot, 'xlabel'): … … 192 210 mat - a 2D numpy array of floats between 0 and 1 193 211 filename - string specifying the filename where to save the data, has to end on '.png' 212 213 Example: 214 >> import numpy 215 >> a = numpy.random.random([100,100]) # creates a 2D numpy array with random values between 0. and 1. 216 >> save_2D_image(a,'randomarray100x100.png') 194 217 """ 195 218 assert PILIMAGEUSE, "ERROR: Since PIL has not been detected, the function NeuroTools.plotting.save_2D_image(...) is not supported!" … … 215 238 filename - string specifying the filename where to save the data, has to end on '.zip' 216 239 frame_duration - specifier for the duration per frame, will be stored as additional meta-data 240 241 Example: 242 >> import numpy 243 >> framelist = [] 244 >> for i in range(100): framelist.append(numpy.random.random([100,100])) # creates a list of 2D numpy arrays with random values between 0. and 1. 245 >> save_2D_movie(framelist, 'randommovie100x100x100.zip', 0.1) 217 246 """ 218 247 try:

