I have this MRE:
import matplotlib.pyplot as plt
import numpy as np
for i in range(6):
plt.plot(np.linspace(0,1), np.linspace(0,1)**(i+1), label=f'{i}')
for i in [0,2,4]:
plt.scatter(np.linspace(0,1), np.linspace(0,1)**(i+1), label=f'{i}')
plt.legend(ncol=2)
Which produces:
I would like to align the entry of the scatter plot with the corresponding line plot.
The end result would be:
line0 scatter0
line1
line2 scatter2
line3
line4 scatter4
line5
Is this possible in matplotlib?