Skip to content

Commit

Permalink
Relabel plots & rc10
Browse files Browse the repository at this point in the history
  • Loading branch information
cbueth committed Aug 2, 2024
1 parent a9c526b commit a1fa69a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
project = "superblockify"
copyright = "2023-2024, superblockify developers"
author = "superblockify developers"
release = "1.0.0rc9"
release = "1.0.0rc10"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
2 changes: 1 addition & 1 deletion superblockify/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""superblockify package version."""

__version__ = "1.0.0rc9"
__version__ = "1.0.0rc10"
6 changes: 3 additions & 3 deletions superblockify/metrics/distances.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def calculate_path_distance_matrix(
[graph.nodes[node]["y"] for node in node_order],
),
coord_title="Projected coordinates of nodes",
labels=("Longitude (m)", "Latitude (m)"),
labels=("x (m)", "y (m)"),
distance_unit=unit_symbol,
)

Expand Down Expand Up @@ -230,7 +230,7 @@ def calculate_euclidean_distance_matrix_projected(
dist_title="Distribution of Euclidean distances",
coords=(x_coord, y_coord),
coord_title="Scatter plot of projected coordinates",
labels=("Longitude (m)", "Latitude (m)"),
labels=("x (m)", "y (m)"),
)

return dist_matrix
Expand Down Expand Up @@ -448,7 +448,7 @@ def calculate_partitioning_distance_matrix(
[partitioner.graph.nodes[node]["y"] for node in node_order],
),
coord_title="Projected coordinates of nodes",
labels=("Longitude (m)", "Latitude (m)"),
labels=("x (m)", "y (m)"),
distance_unit=unit_symbol,
)

Expand Down
4 changes: 3 additions & 1 deletion superblockify/metrics/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def plot_distance_distributions(
# Plot distribution of distances
axe[0].hist(dist_matrix.flatten(), bins=100)
axe[0].set_title(dist_title)
axe[0].set_xlabel(f"Distance ({distance_unit})")
axe[0].set_xlabel(
"Travel time (s)" if distance_unit == "s" else f"Distance ({distance_unit})"
)
axe[0].set_ylabel("Count")
# Plot scatter plot of lat/lon, aspect ratio should be 1:1
axe[1].set_aspect("equal")
Expand Down

0 comments on commit a1fa69a

Please sign in to comment.