On Sat, Feb 5, 2011 at 10:54 PM, Paul Leopardi
<paul.leopa...@iinet.net.au>wrote:
> Hi all,
> 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
> python-base-2.6.2-6.7.1.x86_64
> python-matplotlib-1.0.1-20.1.x86_64
> python-matplotlib-tk-1.0.1-20.1.x86_64
> python-matplotlib-wx-1.0.1-20.1.x86_64
>
> Best, Paul
>
> Script excerpt:
>
> ...
> 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.
> fig=plt.figure(figsize=(15,12))
> ax = fig.gca(projection='3d')
> plt.show()
> ...
> # 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)
> ax.plot(x[0,alow:atop],x[1,alow:atop],x[2,alow:atop],c=rgb.tolist())
> plt.draw()
> plt.show()
>
>
Paul,
I am not exactly sure what your sample script is trying to do. Could you
please attach a short self-contained working script that demonstrates your
problem?
Ben Root
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world?
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users