I am trying to plot a matrix with 2000 columns and 200000 rows. I can test plot and test export the matrix figure fine when the matrix is small using
matshow(my_matrix)
show()
However, when more rows are added to my_matrix, the figure becomes very narrow as there are way more rows than columns, thus losing the precision when zooming in. Can I make matrix figure scrollable? If not, how can I visualize such matrix without losing precision?
I also tried to call savefig('filename', dpi=300) in order to save the image without losing too much precision, but it throws MemoryError when the matrix is big. Many thanks!
ax.set_aspect('auto')
will fix the aspect problem, but your pixels will be rectangles not squares. I have done things with 2k x 150k, but it is starting to push the limits of what mpl can do (there are some hard-coded 32 bit integers in the c++ rasterization code).