title: Visualize 3x3 numpy array and save it as new array of shape: 400x600
body: <p>I have array like:</p>
  
  <pre><code>import numpy as np
  np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
  </code></pre>
  
  <p>and I want to visualize in some nice way, like:</p>
  
  <p><a href="https://i.stack.imgur.com/29Kjh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/29Kjh.png" alt="enter image description here"></a></p>
  
  <p>but having resolution: 400 x 600.</p>
  
  <p>So in the end I want to have new array of shape (400, 600) which if plotted using: </p>
  
  <pre><code>import matplotlib.pyplot as plt
  plt.imshow(my_new_array)
  </code></pre>
  
  <p>will show image like above.</p>
  
  <p>Is it possible? 
  Is there some package that help me?</p>
  
  <p>[edit:]
  After @Mad Physicist comment, I researched latex and following code would do the job:</p>
  
  <pre><code>\documentclass{article}
  \usepackage{amsmath}
  \begin{document}    
  \[    
    \begin{bmatrix}
      1 &amp; 2 &amp; 3 \\
      4 &amp; 5 &amp; 6 \\
      7 &amp; 8 &amp; 9
  
    \end{bmatrix}
  \]
  
  \end{document}
  </code></pre>
  
  <p>and <a href="https://matplotlib.org/users/usetex.html" rel="nofollow noreferrer">matplotlib</a> has option to use text on axis and title but I would not know how to use it in body of plot. Maybe empty plot and use title in the middle?</p>
  
  <p>[edit2]:
  Second answer here is the closest to what I need:
  <a href="https://stackoverflow.com/questions/1381741/converting-latex-code-to-images-or-other-displayble-format-with-python">Converting latex code to Images (or other displayble format) with Python</a>
  However, as stated in my comment below I am running into error on kaggle with different methods which uses matplotlib and latex:</p>
  
  <pre><code>FileNotFoundError: [Errno 2] No such file or directory: 'latex': 'latex'
  </code></pre>