Skip to content

Commit

Permalink
Replace prop_cycler (pybamm-team#3349)
Browse files Browse the repository at this point in the history
  • Loading branch information
kratman authored Sep 18, 2023
1 parent 6622ec6 commit 5687ab0
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 21 deletions.

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion examples/scripts/compare_comsol/discharge_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
plt.grid(True)
plt.xlabel(r"Discharge Capacity (Ah)", fontsize=20)
plt.ylabel(r"$\vert V - V_{comsol} \vert$", fontsize=20)
colors = iter(plt.cycler(color='bgrcmyk'))

for key, C_rate in C_rates.items():
current = 24 * C_rate
Expand Down Expand Up @@ -85,7 +86,7 @@
voltage_difference = np.abs(voltage_sol[0:end_index] - comsol_voltage[0:end_index])

# plot discharge curves and absolute voltage_difference
color = next(ax._get_lines.prop_cycler)["color"]
color = next(colors)["color"]
discharge_curve.plot(
comsol_discharge_capacity, comsol_voltage, color=color, linestyle=":"
)
Expand Down

0 comments on commit 5687ab0

Please sign in to comment.