Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel coordinate plot option added #1088

Merged
merged 3 commits into from
Apr 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
pre-commit fix
  • Loading branch information
lee1043 committed Apr 30, 2024
commit 9cd03d966dfc6d3520b01f581f2cb1c7703193a2
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def parallel_coordinate_plot(
ymax=ymax,
ymin=ymin,
)

if debug:
print("ymins:", ymins)
print("ymaxs:", ymaxs)
Expand Down Expand Up @@ -438,7 +438,7 @@ def _data_transform(
# Data to plot
ys = data # stacked y-axis values
N = ys.shape[1] # number of vertical axis (i.e., =len(metric_names))

if ymax is None:
ymaxs = np.nanmax(ys, axis=0) # maximum (ignore nan value)
else:
Expand All @@ -460,7 +460,7 @@ def _data_transform(
ymins = np.repeat(ymin, N)
except ValueError:
print(f"Invalid input for ymin: {ymin}")

ymeds = np.nanmedian(ys, axis=0) # median
ymean = np.nanmean(ys, axis=0) # mean

Expand All @@ -473,7 +473,7 @@ def _data_transform(
ymids = np.repeat(vertical_center, N)
else:
raise ValueError(f"vertical center {vertical_center} unknown.")

for i in range(0, N):
distance_from_middle = max(
abs(ymaxs[i] - ymids[i]), abs(ymids[i] - ymins[i])
Expand Down
Loading