Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8410677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:14:26+00:00 2026-06-10T00:14:26+00:00

Here is my python code for Matplotlib , I want to draw two lines,

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T00:14:28+00:00Added an answer on June 10, 2026 at 12:14 am

    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:

    >>> lines = matplotlib.loglog(x,<br>
    ... y,<br>
    ... basex=10,<br>
    ... 'ro',<br>
    ... x,<br>
    ... x**(-0.56),<br>
    ... 10<br>
    ... )<br>
      File "<stdin>", line 4<br>
    SyntaxError: non-keyword arg after keyword arg
    

    The error clearly shows some problem with line 4 and the reason is that I specified above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is some sample Python code: import re some_regex = re.compile(r\s+1\s+) result = some_regex.search(
Here is the my python code using BeautifulSoup. The main issue is with the
Python beginner here, I have a list of lists and want to refer to
I have downloaded the two releases of python 2.6.8 from here http://www.python.org/getit/releases/2.6.8/ and I
This is the first time I am using matplotlib and numpy. Here goes the
How to make more room for subplot text fields in Python's matplotlib? Now it
I have a working Python 2.6 code using matplotlib, and would like to get
I'm learning Python and this is my first question here. I've read other topics
Here is my Python code, I can successfully encrypt and decrypt using M2Crypto: from
I'm trying to run NeHe's tutorial here using Python 2.7.3, but It's throwing the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.