Does anyone know how to plot a matrix so that each pixel in the output
picture corresponds precisely to an entry in the matrix?

To see the problem that I have, you might see the odd results that occur
when you do:

M = zero_matrix(GF(2), 1000)
sage: M
1000 x 1000 dense matrix over Finite Field of size 2
sage: for n in range(1000):
....:     for m in range(1000):
....:         if (n + m) % 2 == 0:
....:             M[n,m] = 1
....:             
sage: M
sage: plot(M).show(figsize=[5,5])
sage: plot(M).show(figsize=[6,6]) # <-- This one in particular might be very 
surprising.
sage: plot(M).show(figsize=[7,7])

I'm pretty sure that I understand why these problems occur, and I'm not
sure if there is any good way to fix them.

What I would like to be able to do is be able to take the above matrix
and produce an image with alternating black and white pixels, for
example. Is this possible? I'm not particularly concerned about the
border, or labels for the matrix, right now. I just want the picture of
the matrix itself to look right.


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to