Closed
Description
When I execute the following command:
python3 -c "import matplotlib.pyplot as plt; plt.plot(x=[0,1], y=[0,1]); plt.show()"
it outputs:
Edit: I see my error. I was not supposed to provide the data as keyword arguments. Indeed plt.plot([0,1], [0,1])
works fine.
I don't know anything about how matplotlib works, but perhaps plot
should be able to handle this (similar to how pandas.DataFrame.plot
can handle this):
import pandas as pd
df = pd.DataFrame([[0,0],[1,1]], columns=['A', 'B'])
df.plot('A', 'B')
df.plot(x='A', y='B')
If that's not desirable, then perhaps it could at least throw an error or give a warning that an unexpected keyword argument was given...