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 8350533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:20:45+00:00 2026-06-09T08:20:45+00:00

According to the documentation page: http://matplotlib.sourceforge.net/api/pyplot_api.html the way to use the axvline is like

  • 0

According to the documentation page:
http://matplotlib.sourceforge.net/api/pyplot_api.html
the way to use the axvline is like

axvline(x=0, ymin=0, ymax=1)

However, this does not work in my computer. Nothing is drawn. Rather, simply

axvline(x=0)

without setting the ymin and ymax works.

I am not sure whether this is a bug. Or maybe I missed something subtle?

matplotlib.__version__
'0.99.1.1'

uname -a
Linux pc20172 2.6.32-41-generic #94-Ubuntu SMP Fri Jul 6 18:00:34 UTC 2012 x86_64 GNU/Linux

Edit: a minimum code to reproduce the problem.

from pylab import *
ion()
plot([1,2])
axvline(x=0.5, ymin=1, ymax=2) # No vertical line is drawn.

clf() # Clear the figure to redo the plot.
plot([1,2])
axvline(x=0.5) # Now the desired vertical line is drawn.
  • 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-09T08:20:46+00:00Added an answer on June 9, 2026 at 8:20 am

    From the documentation in help(axvline):

    Draw a vertical line at x from ymin to ymax. With the default
    values of ymin = 0 and ymax = 1, this line will always span the
    vertical extent of the axes, regardless of the ylim settings, even if
    you change them, eg. with the :meth:set_ylim command. That is,
    the vertical extent is in axes coords: 0=bottom, 0.5=middle, 1.0=top
    but the x location is in data coordinates.

    So

    axvline(x=0.5, ymin=1, ymax=2) # No vertical line is drawn.
    

    is drawing a line just off the plot area. If you make the linewidth bigger, you can see this:

    pic showing just-out-of-bounds effect

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

Sidebar

Related Questions

according to fb's documentation (https://developers.facebook.com/docs/reference/api/page/) i don't need a user_access_token to retrieve the notes
There is HTML page with contents like this. Documentation at MDN says that childNodes
According to the Spring Documentation here : While HTTP defines these four methods, HTML
According to the documentation : There is no way to block signals temporarily from
I am trying to use the jQuery CSV plugin, as documented here: http://code.google.com/p/js-tables/wiki/CSV According
According to add to page documentation you should be able to add an app
http://babymoments.co/preview/highres%20preview/5_357/ According to the FPDF documentation here: http://www.fpdf.org/en/doc/image.htm You are supposed to be able
According to : http://code.google.com/apis/ajaxsearch/documentation/#fonje I get back a cursor result, but stupidly, the moreResultsUrl
According to the document, http://www.playframework.org/documentation/1.2.3/configuration#java if I define java.source in conf/application.conf then I should
According to the documentation located here: http://archive.plugins.jquery.com/project/query-object In order to customize $.query 's parameters

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.