Skip to content

Commit

Permalink
Plots: unify unit brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
cbueth committed Jul 22, 2024
1 parent 894a08f commit a9c526b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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=("Longitude (m)", "Latitude (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=("Longitude (m)", "Latitude (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=("Longitude (m)", "Latitude (m)"),
distance_unit=unit_symbol,
)

Expand Down
2 changes: 1 addition & 1 deletion superblockify/partitioning/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def plot_component_rank_size(partitioner, measure):
zorder=2,
)
axe.set_xlabel("Superblock rank", fontsize=12)
axe.set_ylabel(f"Superblock size ({measure} [m])", fontsize=12)
axe.set_ylabel(f"Superblock size ({measure} (m))", fontsize=12)
axe.set_title(
f"Superblock size rank for {partitioner.name} with attribute "
f"`{partitioner.attribute_label}`",
Expand Down
2 changes: 1 addition & 1 deletion superblockify/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def plot_component_size(
Value of the partition for each component
size_measure_label : str
Label of the size measure (e.g. "Number of edges", "Number of nodes",
"Length [m]")
"Length (m)")
ignore : list, optional
List of values to ignore, plot in gray. If None, no values are ignored.
title : str, optional
Expand Down

0 comments on commit a9c526b

Please sign in to comment.