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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:26:56+00:00 2026-06-15T08:26:56+00:00

Related to: plotting autoscaled subplots with fixed limits in matplotlib I would like to

  • 0

Related to: plotting autoscaled subplots with fixed limits in matplotlib

I would like to make a set of subplots that are all on the same scale, using the subplots new compact style, as in http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.subplots and have them be square.

I tried:

fig, axes = subplots(numplots, 1, sharex=True, sharey=True, adjustable='box', aspect='equal')

But I found that these keyword arguments are not implemented in the subplots wrapper. What’s the way to do it?

To reiterate, the goal is simply to have shared axes, so that all the data are on the same scale, and have the plots be square.

  • 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-15T08:26:57+00:00Added an answer on June 15, 2026 at 8:26 am

    Just use adjustable='box-forced' instead of adjustable='box'.

    As @cronos mentions, you can pass it in using the subplot_kw kwarg (additional keyword arguments to subplots are passed on to the Figure not the Axes, thus the need for subplot_kw).

    Instead, I’m going to use setp, which basically just does for item in sequence: item.set(**kwargs). (All matplotlib artists have a set method that can be used similar to matlab’s set.)

    Which one is the “better” approach will depend on what you’re doing. A lot of people would argue that setp is very “unpythonic”, but I don’t see the problem with it.

    As a quick example:

    import matplotlib.pyplot as plt
    
    fig, axes = plt.subplots(ncols=3, sharex=True, sharey=True)
    plt.setp(axes.flat, aspect=1.0, adjustable='box-forced')
    
    axes[0].plot(range(50))
    
    plt.show()
    

    enter image description here

    I forget the reason for the two different adjustable box styles, at the moment. I remember that I found it really confusing the first time I came across it, and I dug through the code and there was some obvious reason for it… I can’t remember what that reason was at the moment, though.

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

Sidebar

Related Questions

I am plotting a boxplot without the outliers and I would like to create
Related to Adding an XML attribute depending on an Option , I would like
Related to an earlier question I asked, I've seen that there's both LoadComponent() and
Related to this question , is the idea of a default servlet that serves
I've been working on a computational physics project (plotting related rates of chemical reactants
Related to a lot of questions and answers on SO, I've learned that it's
related to another issue I found out that: if I want to display BigDecimal.ZERO
Related to a previous issue that I thought was resolved and actually isn't... My
(Related to this post , but not the same.) Is there any way to
Related: Correct way to document open-ended argument functions in JSDoc I've a function that

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.