I'm having trouble using multiple figures with mplot3d. Once each new figure
is plotted, the plots from new figure is also displayed in all of the old
figures. For example, once the plot for figure 2 has finished, the plot fo
figure 1 is replaced by a copy of the plot for figure 2, and so on...
I have included an abbreviated version of my script code. My original code
uses Cython and my GluCat library, but I am fairly sure the cause of the
problem lies either with mplot3d or with my Python script code.
I am using openSUSE 11.2 with
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
# Plot C curves.
for i in xrange(0,C):
# Use a new figure for each curve.
ax = fig.gca(projection='3d')
# Split the curve into M segments, each with an appropriate colour.
for j in range(0,M):
# Find N points forming a curve segment ...
# Determine the colour of the curve segment...
# Plot the curve segment using the chosen colour.
alow=(abot-1 if j>0 else abot)