Here is my python code for Matplotlib, I want to draw two lines, the first one it’s succeed already, I want to add one more line into this graph, which is y=x^(-0.56), so I just simply add one (x,y) pair after it, the code returns an error:
lines = plt.loglog(x, y,basex=10,'ro',x,x**(-0.56),basex=10)
SyntaxError: non-keyword arg after keyword arg
Can anyone help how to do this?
Thats because you are using first basex=10 as a default argument and after that you are passing non-default arguments. If you are sure that your function needs these 7 arguments, then remove the first basex=10.
You can also see the error if you format your code like this:
The error clearly shows some problem with line 4 and the reason is that I specified above.