Add 0.7 skew factor to look more like other charts
This commit is contained in:
parent
3087fc1c9e
commit
9337ba3eb0
1 changed files with 4 additions and 2 deletions
|
@ -22,6 +22,8 @@ TEMP_CENTER = 0 # degrees C
|
|||
TEMP_STEP = 5
|
||||
TEMP_STEP_COUNT = math.ceil(TEMP_RANGE / TEMP_STEP)
|
||||
|
||||
SKEW = 0.7
|
||||
|
||||
def clamp(value, lowest, highest):
|
||||
if value < lowest:
|
||||
return lowest
|
||||
|
@ -67,7 +69,7 @@ class SkewTGraph():
|
|||
cr.restore()
|
||||
|
||||
def skew_t_to_graph(self, x: float, y: float):
|
||||
return (x+y, y)
|
||||
return (x+SKEW*y, y)
|
||||
|
||||
def sample_to_graph(self, temp: float, pressure: float):
|
||||
x = (temp / TEMP_STEP) * self.temp_step_width
|
||||
|
@ -214,7 +216,7 @@ class SkewTLegend():
|
|||
x_rel, y_rel = skew_t.sample_to_screen(temp, PRESSURE_MAX)
|
||||
|
||||
if x_rel < 0:
|
||||
y_rel = skew_t.height + x_rel
|
||||
y_rel = skew_t.height + x_rel / SKEW
|
||||
x_rel = 0
|
||||
|
||||
if y_rel <= 0:
|
||||
|
|
Loading…
Add table
Reference in a new issue