XLPack for Matplotlib Experimental Version 0.1
Example Programs
Loading...
Searching...
No Matches

Displays data as a bar chart. Bar can be used when the horizontal axis represents numerical values, while Bar_str is used when the horizontal axis represents strings.


Sub Test_Plt_Bar()
    Const N = 3
    Dim X(N - 1) As Double, Xstr(N - 1) As String, Y(N - 1) As Double
    Dim I As Integer
    '-- Make data
    X(0) = 4: X(1) = 5: X(2) = 10
    Xstr(0) = "group_a": Xstr(1) = "group_b": Xstr(2) = "group_c"
    Y(0) = 1: Y(1) = 10: Y(2) = 100
    '-- Plot
    Call Plt.Subplot(2, 1, 1)
    Call Plt.Bar(N, X(), Y())
    Call Plt.Subplot(2, 1, 2)
    Call Plt.Bar_str(N, Xstr(), Y())
    Call Plt.Show
End Sub