Skip to content

Commit

Permalink
Merge pull request #12 from mooscaliaproject/develop
Browse files Browse the repository at this point in the history
0.3.1.dev1
  • Loading branch information
bruscalia authored Nov 20, 2024
2 parents aa71961 + 31eb4c9 commit 5e2f1a2
Show file tree
Hide file tree
Showing 23 changed files with 1,963 additions and 1,341 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.12"
python: "3.11"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
Expand Down
16 changes: 7 additions & 9 deletions docs/source/Theory/Rank-and-Crowding.ipynb

Large diffs are not rendered by default.

46 changes: 26 additions & 20 deletions docs/source/Theory/plots.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
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)
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",
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].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",
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].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)
Expand All @@ -30,25 +33,28 @@ def plot_pairs_3d(first, second, colors=("indigo", "firebrick"), **kwargs):
plt.show()


def plot_pairs_2d(first, second, colors=("indigo", "firebrick"), **kwargs):

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",
color=colors[0],
label=first[0],
marker='o',
)
ax[0].set_ylabel("$f_2$")
ax[0].set_xlabel("$f_1$")
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",
color=colors[1],
label=second[0],
marker='o',
)
ax[1].set_ylabel("$f_2$")
ax[1].set_xlabel("$f_1$")
ax[1].set_ylabel('$f_2$')
ax[1].set_xlabel('$f_1$')
ax[1].legend()

fig.tight_layout()
plt.show()
plt.show()
Loading

0 comments on commit 5e2f1a2

Please sign in to comment.