Я хочу открыть несколько осей на фигуре.Однако я получаю следующее предупреждающее сообщение, и отображается только последняя вставная панель.
/usr/lib/python2.7/dist-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
warnings.warn(message, mplDeprecation, stacklevel=1)
Вот код:
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1.inset_locator import InsetPosition
fig, ax= plt.subplots()
iax = plt.axes([0, 0, 1, 2])
ip = InsetPosition(ax, [0.4, 0.5, 0.2, 0.2]) #posx, posy, width, height
iax.set_axes_locator(ip)
iax.plot([1,2,4])
iax1 = plt.axes([0, 0, 1, 2])
ip = InsetPosition(ax, [0.7, 0.2, 0.2, 0.2]) #posx, posy, width, height
iax1.set_axes_locator(ip)
iax1.plot([1,2,4])
У вас есть идеи?