![]() |
XLPack for Matplotlib Experimental Version 0.1
例題集
|
三角格子の擬似カラープロットを行う.
Sub Test_Plt_Tripcolor()
Const N = 256
Dim X(N - 1) As Double, Y(N - 1) As Double, Z(N - 1) As Double
Dim I As Integer
'-- Make data
For I = 0 To N - 1
X(I) = -3 + 6 * Rnd()
Y(I) = -3 + 6 * Rnd()
Z(I) = (1 - X(I) / 2 + X(I) ^ 5 + Y(I) ^ 3) * Exp(-X(I) ^ 2 - Y(I) ^ 2)
Next
'-- Plot
Call Plt.Plot(N, X(), Y(), "o", "markersize=2, color='grey'")
Call Plt.Tripcolor(N, X(), Y(), Z())
Call Plt.Set_xlim(-3, 3)
Call Plt.Set_ylim(-3, 3)
Call Plt.Show
End Sub