Implement draw_special_isobar()
Implement draw_special_isobar() to draw an orange dashed isobar
This commit is contained in:
		
							parent
							
								
									5bf5f66180
								
							
						
					
					
						commit
						85ccede7f0
					
				
					 1 changed files with 18 additions and 6 deletions
				
			
		|  | @ -221,6 +221,21 @@ class SkewTGraph(): | |||
|         cr.stroke() | ||||
|         cr.restore() | ||||
| 
 | ||||
|     def draw_special_isobar(self, | ||||
|                             cr: cairo.Context, | ||||
|                             x: float, | ||||
|                             y: float, | ||||
|                             pressure: float): | ||||
|         cr.save() | ||||
| 
 | ||||
|         cr.set_line_width(0.5) | ||||
|         cr.set_dash([5, 5], 1) | ||||
|         cr.set_source_rgb(1.0, 0.4, 0.0) | ||||
| 
 | ||||
|         self.draw_isobar(cr, x, y, pressure) | ||||
| 
 | ||||
|         cr.restore() | ||||
| 
 | ||||
|     def draw(self, | ||||
|              cr: cairo.Context, | ||||
|              x: float, | ||||
|  | @ -236,16 +251,13 @@ class SkewTGraph(): | |||
|         params = SoundingParameters.from_sounding(sounding) | ||||
| 
 | ||||
|         if self.opts.draw_lcl: | ||||
|             cr.set_source_rgb(1.0, 0.4, 0.0) | ||||
|             self.draw_isobar(cr, x, y, params.lcl[1]) | ||||
|             self.draw_special_isobar(cr, x, y, params.lcl[1]) | ||||
| 
 | ||||
|         if self.opts.draw_lfc: | ||||
|             cr.set_source_rgb(1.0, 0.4, 0.0) | ||||
|             self.draw_isobar(cr, x, y, params.lfc[1]) | ||||
|             self.draw_special_isobar(cr, x, y, params.lfc[1]) | ||||
| 
 | ||||
|         if self.opts.draw_el: | ||||
|             cr.set_source_rgb(1.0, 0.4, 0.0) | ||||
|             self.draw_isobar(cr, x, y, params.el[1]) | ||||
|             self.draw_special_isobar(cr, x, y, params.el[1]) | ||||
| 
 | ||||
|         if self.opts.draw_cape_dry_adiabat: | ||||
|             cr.set_source_rgb(1.0, 0.8, 0.2) | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue