def plot(vector): # by D@CC # on 2021EMay22 # vector is a list of values to be plotted # values between 0 and 255 inclusive # the number of values should be less than 64 samples = [1,2,3,4,5,6] vlen = len(samples) #actual length -1 vmin = min(samples) vmax = max(samples) ncols = 60 nrows = 10 colThickness = 1 + ncols//vlen (e.g. 10) rowThickness = 1 + nrows//(vmax-vmin) # 2 dim array is shown below matrix = [[0,1,2],[2,4,6]] for i = 0,1: print matrix[i,0], matrix[i,1],matrix[i,2] #end def plot progName="testPlot.py" print(progName) plot(a) #source: https://www.educba.com/list-operations-in-python/ #end program testPlot.py