Shift isobar legends down by 50mb
This commit is contained in:
parent
dcf2f2034c
commit
298bbe6357
1 changed files with 11 additions and 4 deletions
|
@ -53,7 +53,11 @@ class SkewTGraph():
|
|||
coord = self.graph_to_screen(-self.width / 2,
|
||||
self.pressure_to_y(pressure))
|
||||
|
||||
cr.set_source_rgba(0, 0, 0, 0.5)
|
||||
if pressure % (2*PRESSURE_STEP) == 0:
|
||||
cr.set_source_rgb(0.35, 0.35, 0.35)
|
||||
else:
|
||||
cr.set_source_rgb(0.75, 0.75, 0.75)
|
||||
|
||||
cr.move_to(x + coord[0], y + coord[1])
|
||||
cr.rel_line_to(self.width, 0)
|
||||
cr.stroke()
|
||||
|
@ -71,12 +75,15 @@ class SkewTGraph():
|
|||
return self.graph_to_screen(*self.sample_to_graph(temp, pressure))
|
||||
|
||||
def draw_isotherms(self, cr: cairo.Context, x: float, y: float):
|
||||
cr.set_source_rgb(0.95, 0.95, 0.95)
|
||||
|
||||
for temp in range(-150, TEMP_MAX+1, TEMP_STEP):
|
||||
x1, y1 = self.sample_to_screen(temp, PRESSURE_MAX)
|
||||
x2, y2 = self.sample_to_screen(temp, PRESSURE_MIN)
|
||||
|
||||
if temp % (2*TEMP_STEP) == 0:
|
||||
cr.set_source_rgb(0.35, 0.35, 0.35)
|
||||
else:
|
||||
cr.set_source_rgb(0.75, 0.75, 0.75)
|
||||
|
||||
cr.move_to(x + x1, y + y1)
|
||||
cr.line_to(x + x2, y + y2)
|
||||
cr.stroke()
|
||||
|
@ -169,7 +176,7 @@ class SkewTLegend():
|
|||
skew_t: SkewTGraph,
|
||||
x: float,
|
||||
y: float):
|
||||
for pressure in range(PRESSURE_MAX, PRESSURE_MIN-1, -2*PRESSURE_STEP):
|
||||
for pressure in range(PRESSURE_MAX-PRESSURE_STEP, PRESSURE_MIN-PRESSURE_STEP-1, -2*PRESSURE_STEP):
|
||||
x_rel = skew_t.width
|
||||
y_rel = skew_t.height - skew_t.pressure_to_y(pressure)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue