Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Bug]: axes(position = [...]) behavior #21441

Copy link
Copy link
Closed
@ramzim

Description

@ramzim
Issue body actions

Bug summary

when setting axes position with ax = plt.axes(position = [...]) the position data is not being incorporated.

Code for reproduction

import matplotlib.pyplot as plt

fig = plt.figure()

pos1 = [0.1, 0.1, 0.3, 0.8]
pos2 = [0.5, 0.1, 0.4, 0.6]

ax1 = plt.axes(position = pos1)
ax1.plot([0,1], [0, 1], color = 'r', linewidth = 3)

ax2 = plt.axes(position = pos2)
ax2.plot([1, 0], [0, 1], color = 'b', linestyle = '--')

Actual outcome

The two axes completely overlap
test1

Expected outcome

Would expect two separate axes (these were created by adding
ax1.set_axes(pos1) and ax2.set_axes(pos2), which should not be necessary)
test2

Operating system

Windows

Matplotlib Version

3.4.2

Matplotlib Backend

Qt5Agg

Python version

3.8.8

Jupyter version

No response

Other libraries

No response

Installation

conda

Conda channel

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.