-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
Community supportUsers in need of help.Users in need of help.
Description
Bug report
Bug summary
get_position() and set_position() are inconsistent
Code for reproduction
box1 = ax1.get_position()
print(box1)
ax1.set_position([box1.x0, box1.y0, box1.x1-box1.x0, box1.y1-box1.y0])
box2 = ax1.get_position()
print(box2)
ax1.set_position([box1.x0, box1.y0, box1.x1, box1.y1])
box3 = ax1.get_position()
print(box3)
Actual outcome
Bbox(x0=0.125, y0=0.125, x1=0.9, y1=0.88)
Bbox(x0=0.125, y0=0.125, x1=0.9, y1=0.88)
Bbox(x0=0.125, y0=0.125, x1=1.025, y1=1.005)
Expected outcome
Bbox(x0=0.125, y0=0.125, x1=0.9, y1=0.88)
Bbox(x0=0.125, y0=0.125, x1=0.775, y1=0.755)
Bbox(x0=0.125, y0=0.125, x1=0.775, y1=0.755)
get_position() and set_position() should be consistent.
Matplotlib version
- Operating system: Linux and Mac OS X
- Matplotlib version: 3.2.1
- Matplotlib backend (
print(matplotlib.get_backend())
): module://ipykernel.pylab.backend_inline - Python version: 3.7.6
- Jupyter version (if applicable): 6.0.3
- Other libraries:
I installed matplotlib via conda using the conda-forge channel.
Metadata
Metadata
Assignees
Labels
Community supportUsers in need of help.Users in need of help.