[Numpy-discussion] Numpy logo in VTK

Virgil Stokes vs@it.uu...
Wed Jun 27 11:34:38 CDT 2012


On 27-Jun-2012 08:04, klo uo wrote:
> from numpy import arange, ones
> import matplotlib.pyplot as plt
> from mpl_toolkits.mplot3d import Axes3D
>
> fig = plt.figure()
> ax = fig.add_subplot(111, projection='3d')
>
> o = ones(4)
> r = arange(4)
>
> # planes:
> for z in arange(3)+1:
>     ax.bar(r, o*4, zs=z, zdir='x', alpha=.05, width=1)
>     ax.bar(r, o*4, zs=z, zdir='y', alpha=.05, width=1)
>     ax.bar(r, o*4, zs=z, zdir='z', alpha=.05, width=1)
>
> # N
> for i in [1, 2]:
>      ax.bar3d([3-i], [0], [i], [.9], [.1], [.9], color='y', linewidth=.1)
>      ax.bar3d(o+(i*(-1)**i), o-1, r, o-.1, o-.9, o-.1, color='y', linewidth=.1)
>
> # cage
> ax.bar3d([0], [0], [0], [4], [4], [4], alpha=.05, color='w', linewidth=0)
>
> plt.show()
> # plt.savefig('numpy.png')
Umh...
The first version that you posted looks ok on my screen (N is not inverted). And 
this version shows no difference in the "N"; but, it does show tick marks 
labeled with numerical values.

--V


More information about the NumPy-Discussion mailing list