How to fix these kinks in the norm_pan and norm_tau curves? I tried using a quite high resolution and logarithmic spacing when defining t, but this did not fix the problem.
import numpy as np import matplotlib.pyplot as plt t = np.logspace(0, 4, 10**5, base=10) CP = 400 P_an = 1100 tau = 30 P = CP+P_an/(1+t/tau) dP_dPan = 1/(1+t/tau) dP_dtau = (P_an*t)/(tau**2*(1+t/tau)**2) S_CP = CP/P norm_pan = (dP_dPan - dP_dPan.min()) / (dP_dPan.max() - dP_dPan.min()) norm_tau = (dP_dtau - dP_dtau.min()) / (dP_dtau.max() - dP_dtau.min()) plt.figure(figsize=(6,4)) plt.plot(t, norm_pan, label=r'$\text{P}_\text{an}$') plt.plot(t, norm_tau, label=r'$\tau$') plt.plot(t, S_CP, label="CP") plt.vlines(tau, 0, max(norm_tau), linestyles=':', colors="dimgray", alpha=.4, lw=1.5) plt.xscale('symlog') plt.xlim(1, 10001) plt.ylim(0, 1.05) ax = plt.gca() ax.spines["top"].set_visible(False) ax.spines["right"].set_visible(False) ax.set_xticks([1, 10, tau, 100, 1000, 10000]) ax.set_xticklabels([1, 10, r'$\tau$', 100, 1000, 10000]) plt.legend(fontsize=9, frameon=False, loc='center right') plt.tight_layout() plt.show() 
I believe this is a plotting artifact which gets even more visible if plotting for the range plt.xlim(0.1, 100001)

Edit The solution to the problem makes me realize that an artifact likely rose concerning CP as well; however, this was harder to notice due to the slope of the curve near one.


Pandtau. Maybe it needs more values in first part. You could also check how it looks when you draw only first part in resized window.tauis a parameter used for calculatingP(see the code).tdefines the number of plotted points.tau? is it for variabletauor other variable? If it is different variable then check values in other variable(dP_dtau - dP_dtau.min()) / (dP_dtau.max() - dP_dtau.min())againstt. Please read the code block, you will find everything in there. I admit that the labelling might be a bit misleading if only looking at the figures.np.logspaceto generate 4 points on the range[1...10^5].. Why are you surprised that you are seeing plotting artefacts? 40 is a more reasonable number (50 is the default).