Skip to content

Commit

Permalink
Merge pull request #204 from MihaMi27/main
Browse files Browse the repository at this point in the history
Issue #202: Fix naming of methods in PlotData, DeadEndIdentification
  • Loading branch information
firefly-cpp authored Dec 12, 2024
2 parents 1297e70 + 28a3d8f commit c1c96ba
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion examples/dead_end_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
tolerance_position=2,
minimum_distance=500)
Dead_ends.identify_dead_ends()
Dead_ends.draw_map()
Dead_ends.show_map()
2 changes: 1 addition & 1 deletion examples/draw_map_with_identified_hills.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
# draw detected hills
Map = PlotData()

Map.draw_hills_in_map(data['altitudes'], data['distances'], all_hills)
Map.show_hills_on_map(data['altitudes'], data['distances'], all_hills)
4 changes: 2 additions & 2 deletions examples/draw_map_with_identified_intervals.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Intervals.identify_intervals()
all_intervals = Intervals.return_intervals()
Map = PlotData()
Map.draw_intervals_in_map(timestamps, distances, all_intervals)
Map.show_intervals_on_map(timestamps, distances, all_intervals)

# Identifying the intervals in the activity by heart rate and drawing the map
Intervals = IntervalIdentificationByHeartRate(
Expand All @@ -33,4 +33,4 @@
Intervals.identify_intervals()
all_intervals = Intervals.return_intervals()
Map = PlotData()
Map.draw_intervals_in_map(timestamps, distances, all_intervals)
Map.show_intervals_on_map(timestamps, distances, all_intervals)
6 changes: 3 additions & 3 deletions sport_activities_features/dead_end_identification.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,12 @@ def identify_dead_ends(self) -> None:

print('\rProgress: 100 %')

def draw_map(self) -> None:
def show_map(self) -> None:
"""Method for visualisation of the exercise with identified dead ends."""
plot = self.show_map()
plot = self.plot_map()
plot.show()

def show_map(self) -> plt:
def plot_map(self) -> plt:
"""Method for plotting the exercise with dead ends.
Returns:
Expand Down
16 changes: 8 additions & 8 deletions sport_activities_features/plot_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ def get_positions_of_intervals(self, identified_intervals: list) -> list:
points.append(identified_intervals[i][j])
return points

def draw_hills_in_map(
def show_hills_on_map(
self,
altitude: list,
distance: list,
identified_hills: list,
) -> None:
"""Method for plotting all hills identified in data
on topographic map and rendering the plot.\n
"""Method for rendering all hills identified in data
on topographic map plot.\n
Args:
altitude (list):
list of altitudes
Expand All @@ -54,14 +54,14 @@ def draw_hills_in_map(
plt = self.plot_hills_on_map(altitude, distance, identified_hills)
plt.show()

def draw_intervals_in_map(
def show_intervals_on_map(
self,
timestamp: list,
distance: list,
identified_intervals: list,
) -> None:
"""Method for plotting all intervals identified in data
on topographic map and rendering the plot.\n
"""Method for rendering all intervals identified in data
on topographic map plot.\n
Args:
timestamp (datetime):
list of timestamps
Expand All @@ -73,8 +73,8 @@ def draw_intervals_in_map(
plt = self.plot_intervals_in_map(timestamp, identified_intervals)
plt.show()

def draw_basic_map(self) -> None:
"""Method for plotting the whole topographic map and rendering the plot."""
def show_basic_map(self) -> None:
"""Method for rendering the whole topographic map plot."""
plt = self.plot_basic_map()
plt.show()

Expand Down

0 comments on commit c1c96ba

Please sign in to comment.