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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T19:21:09+00:00 2026-05-20T19:21:09+00:00

I have a somewhat complex plot task in matplotlib that requires–I think–an autoscale() function

  • 0

I have a somewhat complex plot task in matplotlib that requires–I think–an autoscale() function that excludes certain plotted lines.

The built-in autoscale_view() function in matplotlib gets the union of all the bboxes of the axis and then scales based on that. I’ve made a loose_autoscale_view that adds a margin factor to it. But both determine scaling based on all the points on the axis. I don’t want that, as I want some points to live in the bottom margin.

I need to make an autoscale function in which I do something like:

1) Get the lines I want and exclude the ones I don’t (I could pass in an excluded_lines arg). What is the function for getting lines from an axis? I couldn’t find it.

2) Get the bboxes for those lines and use a similar approach as autoscale_view(). How can I get the bbox associated with a line?

My 1&2 may be totally off-base, too–just suggesting the approach I was considering.

  • 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-20T19:21:10+00:00Added an answer on May 20, 2026 at 7:21 pm
    from matplotlib import pyplot as plt
    plt.plot([1,2,3],[3,4,5])
    plt.plot([2,3,4],[4,9,4])
    ax = plt.gca()
    l = ax.get_lines()[0]  # a line instance
    p = l.get_path()
    p.get_extents() # a bbox instance
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several somewhat separate programs, that conceptually can fit into a single project.
Although somewhat related to this question , I have what I think is a
I have somewhat interesting development situation. The client and deployment server are inside a
Does VS2008 have somewhat C++0x standard support? DUPLICATE Visual Studio support for new C
I have a somewhat messily-formatted Objective-C code base. Is there a way to have
I have a somewhat complicated branching structure at work (at least for me). It
I am learning about SOAP implementation and have become somewhat confused regarding the appropriate
OK, I have a somewhat complicated system in C++. In a nutshell, I need
I’ve only just started using ASP.NET MVC, and I have a somewhat trivial question:
I have a page where there is a column and a content div, somewhat

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.