Ask Your Question

# Revision history [back]

For the first question, you can use

 sage: bar_chart([5,3,6,1], width=1)


For the second question, maybe something like that

sage: data = [[4,3],[5,6],[7,2],[5,6]]
sage: m = matrix(10,10)
sage: for x,y in data:
....:     m[x,y] += 1
....: matrix_plot(m)


You should then use the options of matrix_plot to change the colors as you want.