Skip to content

Instantly share code, notes, and snippets.

@jurand71
Created July 16, 2023 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jurand71/0a848492b18cd72692cd884a03a87798 to your computer and use it in GitHub Desktop.
Save jurand71/0a848492b18cd72692cd884a03a87798 to your computer and use it in GitHub Desktop.
# wykluczamy niektóre pary parametrów
exclude = [(1100, 15), (400, 75), (200, 50), (200, 75), (100, 50), (100, 75)]
# przypisanie koorów krzywym I-U
kolor = ['#1f77b4', '#2ca02c', '#8c564b', '#9467bd', '#d62728', '#e377c2', '#ff7f0e']
# pole rysunku dzielimy na cztery części o wspólnej osi x i y
fig, ax = plt.subplots(2, 2, figsize=(16, 10), sharex=True, sharey=True)
for m, irr in enumerate(E_IEC61853):
for n, tc in enumerate(T_IEC61853):
if (irr, tc) in exclude:
continue
i = n + 4*m
j = n // 2, n % 2
label = (
"$G_{eff}$ " + f"{irr} $W/m^2$"
)
ax[j].plot(curve_info['v'][i], curve_info['i'][i], label=label, c=kolor[m])
v_mp = curve_info['v_mp'][i]
i_mp = curve_info['i_mp'][i]
# oznacz MPP
ax[j].plot(v_mp, i_mp, ls='', marker='o', c=kolor[m])
ax[j].vlines(v_mp, 0, i_mp, linestyle='dashed', color=kolor[m])
ax[j].legend(loc='upper right')
if j[0] == 1:
ax[j].set_xlabel('Napięcie [V]')
if j[1] == 0:
ax[j].set_ylabel('Natężenie [A]')
ax[j].set_title(f"{s_m_par.name}, " + "$T_{cell}$ " + f"{tc} " + "$^{\circ}C$")
ax[j].grid(True)
ax[j].set_xlim([0, 70])
fig.tight_layout()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment