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

  • Home
  • SEARCH
  • 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 3277708
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:23:57+00:00 2026-05-17T19:23:57+00:00

I drew this graph using matplotlib using the following code. import matplotlib import matplotlib.pyplot

  • 0

alt text

I drew this graph using matplotlib using the following code.

import matplotlib
import matplotlib.pyplot as plt

x = [450.0, 450.0, 438.0, 450.0, 420.0, 432.0, 416.0, 406.0, 432.0, 400.0]
y = [328.90000000000003, 327.60000000000031, 305.90000000000146, 285.2000000000013, 276.0, 264.0, 244.0, 236.0, 233.5, 236.0]
z = [2,4,6,8,10,12,14,16,18,20]

plt.plot(z,x,'-',lw=3)
plt.plot(z,y,'--',lw=3)
plt.show()

As you can see the graph of x touches the axis boundary and does not look good. How can I change 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-05-17T19:23:58+00:00Added an answer on May 17, 2026 at 7:23 pm

    Use axis:

    plt.plot(z,x,'-',lw=3)
    plt.plot(z,y,'--',lw=3)
    plt.axis([2,20,100,500])
    plt.show()
    

    Or, use ylim:

    plt.ylim([100,500])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I drew a little graph in paint that explains my problem: But it doesn't
Firstly, please go to this url: celebritywallpaperbase picture #1 is Drew Barrymore smile picture
I have this code- /** Save the web view as a screenshot. Currently only
I have a spaceship in a 3D environnement. I drew a B-Spline curve using
I'm trying to convert an openGL [edit: card that I drew(?):) thx unwind]containing a
On the left you will notice the google logo rendered by IE, I drew
I'm using iTextSharp to print a PDF document. Everything goes ok until I have
I have to represent graphically an oriented graph like in the image below. alt
This is the first time I've used interceptors with the fluent registration and I'm
I used Drew Wilson's autocomplete , its really well made but poorly documented. I

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.