Skip to content

Commit

Permalink
cleanup examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mtod92 committed Dec 21, 2023
1 parent e321a12 commit b4b5e8c
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 351 deletions.
12 changes: 7 additions & 5 deletions equpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def solve(
self.result = np.exp(x)
self.residuals = delta
warnings.warn(
"Tolerance not reached. Manually check if the result is satisfying. Either change starting point, increase iterations or weight.",
"Tolerance not reached. Manually check if the result is satisfying. Either change starting point, increase iterations and/or weight.",
stacklevel=2,
)
return np.exp(x), delta
Expand All @@ -106,15 +106,17 @@ def plotter(self):
np.arange(len(self.residuals)), self.residuals, s=120, color="black"
)

ax1.set_xlabel("steps", fontsize=12)
ax1.set_ylabel("||r||", fontsize=12)
ax1.set_xlabel("steps", fontsize=14, fontname = 'Arial')
ax1.set_ylabel("||r||", fontsize=14, fontname = 'Arial')
ax1.set_title('Algorithm Progress', fontsize=16, fontname = 'Arial')
ax1.set_yscale("linear")

ax2.bar(np.arange(0, len(self.result)), self.result)
ax2.set_ylabel("conc", fontsize=12)
ax2.set_ylabel("concentration", fontsize=14, fontname = 'Arial')
ax2.set_xticks(np.arange(0, len(self.result)))
ax2.set_title('Equilibrium Concentrations', fontsize=16, fontname = 'Arial')
ax2.set_xticklabels(
sorted(self.s, key=lambda x: self.s[x]), fontsize=12, rotation=90
sorted(self.s, key=lambda x: self.s[x]), fontsize=12, rotation=90, fontname = 'Arial'
)


Expand Down
Loading

0 comments on commit b4b5e8c

Please sign in to comment.