Closed
Description
Bug report
A 3D line plot is created and pickled for reloading later. Loading the plot later results in a plot that cannot be interacted with.
Code for reproduction
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import pickle as pk
import numpy as np
plt.ioff()
t = np.linspace(0, 6*np.pi, 1000)
x = np.sin(t)
y = np.cos(t)
z = t/100
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot(x, y, z, label='3d plot')
fo = open('test_file.pkl', 'wb')
pk.dump(fig, fo)
fo.close()
In a different python instance
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import pickle as pk
plt.ioff()
fi = open('test_file.pkl', 'rb')
fig = pk.load(fi)
fi.close()
fig.show()
The figure is shown, but cannot be interacted with.
Expected outcome
The figure would be shown and the plot could be interacted with to show a different view.
Matplotlib version
- Operating system: Win7
- Matplotlib version: 2.1.2
- Matplotlib backend: Qt5Agg
- Python version: 3.6.4
- Jupyter version (if applicable): N/A
- Other libraries: iPython 6.2.1, Spyder 3.2.6
matplotlib installed by Anaconda from default channel.