Skip to content
Snippets Groups Projects
Commit 5b39eabe authored by Lan Dam's avatar Lan Dam
Browse files

adjust plotting_bot_pixel in get_heitht()

parent caab6ec0
No related branches found
No related tags found
1 merge request!136tps scrollbar, label's position, color, height for each
...@@ -352,17 +352,23 @@ class PlottingAxes: ...@@ -352,17 +352,23 @@ class PlottingAxes:
) )
) )
def get_height(self, ratio, bw_plots_distance=0.0015): def get_height(self, ratio: float, bw_plots_distance: float = 0.0015,
pixel_height: float = 19) -> float:
""" """
Calculate new plot's bottom position and return plot's height. Calculate new plot's bottom position and return plot's height.
:param ratio: float - ratio of the plot height on the BASIC_HEIGHT :param ratio: ratio of the plot height on the BASIC_HEIGHT
:param bw_plots_distance: float - distance between plots :param bw_plots_distance: distance between plots
:return plot_h: float - height of the plot :param pixel_height: height of plot in pixel (
for TPS/TPS legend, height of each day row)
:return plot_h: height of the plot
""" """
plot_h = constants.BASIC_HEIGHT * ratio # ratio with figure height plot_h = constants.BASIC_HEIGHT * ratio # ratio with figure height
self.parent.plotting_bot -= plot_h + bw_plots_distance self.parent.plotting_bot -= plot_h + bw_plots_distance
self.parent.plotting_bot_pixel += 19 * ratio bw_plots_distance_pixel = 3000 * bw_plots_distance
self.parent.plotting_bot_pixel += (pixel_height * ratio +
bw_plots_distance_pixel)
return plot_h return plot_h
def add_ruler(self, color): def add_ruler(self, color):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment