Is there a quick way (without the overhead of using a GUI or graphics module) to visually render 2d and 3d lists.
For example if I have a 2d array of zeros and ones, I would like to draw a black and white grid according to this array.
I am looking for a module that allows me to do these thing in simple ways. Similar to the easiness of that matplotlib allows drawing graphs.
The command matshow in matplotlib displays a matrix:
import pylab as p
p.matshow(p.array([[0,1],[1,1]]),cmap="Greys") ; p.show()
This would work for 2d lists. As for 3d lists, I'm not sure I fully understand how you're planning on visualising them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With