Move function to be closer to its caller
This commit is contained in:
parent
9657f85090
commit
8240597ddb
1 changed files with 6 additions and 6 deletions
|
@ -56,12 +56,6 @@ class SkewT():
|
|||
|
||||
return factor * self.height
|
||||
|
||||
def sample_to_graph(self, temp: float, pressure: float):
|
||||
x = (temp / TEMP_STEP) * self.temp_step_width
|
||||
y = self.pressure_y(pressure)
|
||||
|
||||
return x + y, y
|
||||
|
||||
def draw_isobars(self, cr: cairo.Context, x: float, y: float):
|
||||
for pressure in range(PRESSURE_MIN, PRESSURE_MAX+1, PRESSURE_STEP):
|
||||
coord = self.graph_to_screen(-self.width / 2,
|
||||
|
@ -88,6 +82,12 @@ class SkewT():
|
|||
cr.line_to(x + screen_x2, y + screen_y2)
|
||||
cr.stroke()
|
||||
|
||||
def sample_to_graph(self, temp: float, pressure: float):
|
||||
x = (temp / TEMP_STEP) * self.temp_step_width
|
||||
y = self.pressure_y(pressure)
|
||||
|
||||
return x + y, y
|
||||
|
||||
def draw_samples(self,
|
||||
cr: cairo.Context,
|
||||
x: float,
|
||||
|
|
Loading…
Add table
Reference in a new issue