Compare commits
	
		
			No commits in common. "e5b95b30799260506e35aa43bb7627e3c6570a7b" and "eee4c781cc8088e64183af4d3efc998870a6bce7" have entirely different histories.
		
	
	
		
			e5b95b3079
			...
			eee4c781cc
		
	
		
					 2 changed files with 1 additions and 13 deletions
				
			
		|  | @ -33,9 +33,6 @@ class Hodograph(): | ||||||
|             box_height = max_y - min_y |             box_height = max_y - min_y | ||||||
|             box        = max(box_width, box_height) * 1.5 |             box        = max(box_width, box_height) * 1.5 | ||||||
| 
 | 
 | ||||||
|             if box == 0: |  | ||||||
|                 box = 1.5 |  | ||||||
| 
 |  | ||||||
|             # |             # | ||||||
|             # Ensure the data points are centered within the hodograph |             # Ensure the data points are centered within the hodograph | ||||||
|             # viewbox. |             # viewbox. | ||||||
|  | @ -289,11 +286,7 @@ class Hodograph(): | ||||||
|             cr.rectangle(offset + x, y + width * 1.5, width, width) |             cr.rectangle(offset + x, y + width * 1.5, width, width) | ||||||
|             cr.stroke() |             cr.stroke() | ||||||
| 
 | 
 | ||||||
|             if height < 1000: |             text    = "%dm" % (height) if height < 1000 else "%dkm" % (height /1000) | ||||||
|                 text = "%dm" % (height) |  | ||||||
|             else: |  | ||||||
|                 text = "%dkm" % (int(height / 1000.0)) |  | ||||||
| 
 |  | ||||||
|             extents = cr.text_extents(text) |             extents = cr.text_extents(text) | ||||||
| 
 | 
 | ||||||
|             cr.move_to(offset + x - extents.width / 4, y + 3.5*width) |             cr.move_to(offset + x - extents.width / 4, y + 3.5*width) | ||||||
|  |  | ||||||
|  | @ -285,11 +285,6 @@ class Sounding(DatabaseTable): | ||||||
| 
 | 
 | ||||||
|         return wind_speed_dir(shear_u / levels, shear_v / levels) |         return wind_speed_dir(shear_u / levels, shear_v / levels) | ||||||
| 
 | 
 | ||||||
|     def hodograph_samples(self) -> list[SoundingSample]: |  | ||||||
|         samples = filter(lambda s: s.height is not None, self.samples) |  | ||||||
| 
 |  | ||||||
|         return sorted(samples, key=lambda s: s.height) |  | ||||||
| 
 |  | ||||||
| def between(n, a, b): | def between(n, a, b): | ||||||
|     return n > a and n < b |     return n > a and n < b | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue