Для этого вы можете использовать matplotlib . matplotlib имеет модуль mplot3d , который будет делать именно то, что вы хотите.
from matplotlib import pyplot
from mpl_toolkits.mplot3d import Axes3D
import random
fig = pyplot.figure()
ax = Axes3D(fig)
sequence_containing_x_vals = list(range(0, 100))
sequence_containing_y_vals = list(range(0, 100))
sequence_containing_z_vals = list(range(0, 100))
random.shuffle(sequence_containing_x_vals)
random.shuffle(sequence_containing_y_vals)
random.shuffle(sequence_containing_z_vals)
ax.scatter(sequence_containing_x_vals, sequence_containing_y_vals, sequence_containing_z_vals)
pyplot.show()
В приведенном выше коде создается цифра, подобная:
[/g2]
Примерно так должно работать
edit: добавлена обработка ошибок, чтобы убедиться, что события не застряли «выключено»
Private Sub Worksheet_Change(ByVal Target As Range)
Dim v
'skip multi-cell updates
If Target.CountLarge > 1 Then Exit Sub
With Target
v = Trim(.Value)
If Len(v) > 0 And .Column > 2 Then
If v Like "Z-#*" Then
On Error Goto haveError
Application.EnableEvents = False
With Me.Cells(.Row + 1, 3)
.Value = Right(v, Len(v) - 2)
.Offset(0, 1).Select '? select next cell in new row ?
End With
.Value = "" 'clear the original "Z" scan?
Application.EnableEvents = True
Else
Me.Cells(.Row, .Column + 1).Select
End If
End If
End With
Exit sub
haveError:
Msgbox Err.Description
Application.EnableEvents = True
End Sub