What you are looking for is imshow :
import matplotlib.pyplot as plt import numpy as np
Then you just need to get the Y shortcuts somewhere.

It seems that the image in your question has some interpolation on the image. Let's have a few more things:
import matplotlib.pyplot as plt import numpy as np
creates 
However, interpolation is not always good here. To simplify the separation of different lines, you can use colors:
import matplotlib.pyplot as plt import matplotlib.colors import numpy as np
creates

Of course, you will want to use something less strange, like a coloring scheme, but it really depends on your artistic views. Here the fact is that all True elements in line n have the value n+1 , and all False elements are 0 in data_color . This allows you to create a color map. Naturally, if you need a cyclic color map with two or three colors, just use the data_color module in imshow , for example, data_color % 3 .
Drv
source share