How can I import matplotlib pyplot options as dict?
import numpy as np
import matplotlib.pyplot as plt
x=np.linspace(1,100,100)
plt.plot(x,x*x,color=np.random.rand(3,1),linewidth=2)
I would like to covert the last command as:
str1={'color':np.random.rand(3,1),'linewidth':2}
plt.plot(x,x*x,str1)
It doesn't have to be a dictionary. Any format will be fine. I hate to have to keep typing, but I also don't want to set it permanently. Thanks.