forked from anyoptimization/pymoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request anyoptimization#342 from bruscalia/feature/crowdin…
…g_metrics Feature new crowding metrics
- Loading branch information
Showing
17 changed files
with
1,729 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
prune . | ||
recursive-include pymoo *.py *.pyx | ||
recursive-include pymoo *.py *.pyx *.pxd | ||
recursive-include pymoo/cython/vendor *.cpp *.h | ||
include LICENSE Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import matplotlib.pyplot as plt | ||
|
||
|
||
def plot_pairs_3d(first, second, colors=("indigo", "firebrick"), **kwargs): | ||
|
||
fig, ax = plt.subplots(1, 2, subplot_kw={'projection':'3d'}, **kwargs) | ||
|
||
ax[0].scatter( | ||
*first[1].T, | ||
color=colors[0], label=first[0], marker="o", | ||
) | ||
ax[0].set_ylabel("$f_2$") | ||
ax[0].set_xlabel("$f_1$") | ||
ax[0].set_zlabel("$f_3$") | ||
ax[0].legend() | ||
|
||
ax[1].scatter( | ||
*second[1].T, | ||
color=colors[1], label=second[0], marker="o", | ||
) | ||
ax[1].set_ylabel("$f_2$") | ||
ax[1].set_xlabel("$f_1$") | ||
ax[1].set_zlabel("$f_3$") | ||
ax[1].legend() | ||
|
||
ax[0].view_init(elev=30, azim=30) | ||
ax[1].view_init(elev=30, azim=30) | ||
|
||
fig.tight_layout() | ||
plt.show() | ||
|
||
|
||
def plot_pairs_2d(first, second, colors=("indigo", "firebrick"), **kwargs): | ||
|
||
fig, ax = plt.subplots(1, 2, **kwargs) | ||
|
||
ax[0].scatter( | ||
*first[1].T, | ||
color=colors[0], label=first[0], marker="o", | ||
) | ||
ax[0].set_ylabel("$f_2$") | ||
ax[0].set_xlabel("$f_1$") | ||
ax[0].legend() | ||
|
||
ax[1].scatter( | ||
*second[1].T, | ||
color=colors[1], label=second[0], marker="o", | ||
) | ||
ax[1].set_ylabel("$f_2$") | ||
ax[1].set_xlabel("$f_1$") | ||
ax[1].legend() | ||
|
||
fig.tight_layout() | ||
plt.show() |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.