title: ValueError: x and y must have same first dimension, but have shapes, tkinter and matplotlib problem
body: <p>I've been playing with GUI and matlib for few days now, but I can't find an issue in the code below.</p>
  <pre><code>from tkinter import *
  import matplotlib.pyplot as plt
  import numpy as np
  
  root = Tk()
  root.geometry('700x700')
  entry1 = Entry(root, width = 20)
  entry1.pack()
  
  def button_command():
      x = np.array(np.linspace(10,1,10))
      y = np.array(entry1.get())
      fig = plt.figure()
      ax = fig.add_subplot(1, 1, 1)
      ax.spines['left'].set_position('center')
      ax.spines['bottom'].set_position('zero')
      ax.spines['right'].set_color('none')
      ax.spines['top'].set_color('none')
      ax.xaxis.set_ticks_position('bottom')
      ax.yaxis.set_ticks_position('left')
      plt.plot(x,y, &quot;r&quot;)
      plt.show()
      return None
  
  Button(root, text=&quot;Draw function&quot;, command=button_command).pack()
  
  root.mainloop()
  </code></pre>
  <p>I've been getting this error:</p>
  <pre><code>ValueError: x and y must have same first dimension, but have shapes (10,) and (1,)
  </code></pre>
  <p>I tried to delete np.array</p>
  <pre><code>x = np.linspace(10,1,10)
  y = entry1.get()
  </code></pre>
  <p>but I don't know how can I combine y = entry1.get() with x = np.linspace(10,1,10)</p>
  <p>The function I am trying to enter is <strong>200-4*x</strong></p>
  <p>EDIT:
  Full error code:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;Python\Python39\lib\tkinter\__init__.py&quot;, line 1884, in __call__
      return self.func(*args)
    File &quot;gui.py&quot;, line 21, in button_command
      plt.plot(x,y, &quot;r&quot;)
    File &quot;Python\Python39\lib\site-packages\matplotlib\pyplot.py&quot;, line 2988, in plot
      return gca().plot(
    File &quot;Python\Python39\lib\site-packages\matplotlib\axes\_axes.py&quot;, line 1605, in plot
      lines = [*self._get_lines(*args, data=data, **kwargs)]
    File &quot;Python\Python39\lib\site-packages\matplotlib\axes\_base.py&quot;, line 315, in __call__
      yield from self._plot_args(this, kwargs)
    File &quot;Python\Python39\lib\site-packages\matplotlib\axes\_base.py&quot;, line 501, in _plot_args
      raise ValueError(f&quot;x and y must have same first dimension, but &quot;
  ValueError: x and y must have same first dimension, but have shapes (10,) and (1,)
  </code></pre>