-
Notifications
You must be signed in to change notification settings - Fork 89
Closed
Description
Hi folks,
Somehow I am not able to create a subfigure anymore. I have no idea why this was possible before, but now it stopped working.
`fig, ax = plt.subplots()
r = collect(1:10)
ax.plot(r,r .^ 2)
box = ax.get_position()
width = box.width
height = box.height
rect = [1.05,0.1,0.5,0.3]
inax_position = ax.transAxes.transform(rect[1:2])
transFigure = fig.transFigure.inverted()
transFigure = fig.transFigure.inverted() ## Here it crashes
infig_position = transFigure.transform(inax_position)
x = infig_position[1]
y = infig_position[2]
width *= rect[3]
height *= rect[4]
subax = fig.add_axes([x,y,width,height])
subax.plot(r, r.^3)
plt.tight_layout()
plt.show()`
Everything at newest version.
best,
v.
Metadata
Metadata
Assignees
Labels
No labels