title: How do I only plot the values I want?
body: <p>I currently have the code and I having some trouble trying to plot it, I know that trying to plot both ymax and y won't work in this case, but how would I go about plotting just the value for y? I have plotted the function before by removing the ymax from the return, but I need to print the values and plot the solution for y.</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  def GaussElimination(A):
      '''
      Description: Use Gauss elimination to solve a set of simultaneous equations
      Parameters: A  a matrix of coefficient and constant value for the system
      Return: a matrix holding the solution to the equation.  This corresponds to the last n 
      '''
      nr,nc=A.shape
      B= A.copy()
  
      # start the gauss elimination
      for r in range(nr):
          #pivoting
          max=abs(B[r][r])
          maxr = r
          for rr in range(r,nr):
              if max &lt; abs(B[rr][r]):
                  max = abs(B[rr][r])
                  maxr = rr
  
          if max == 0:
              print("Singular Matrix")
              return []
  
          # swap if needed
          if (maxr != r):
              for c in range(nc):
                  temp = B[r][c]
                  B[r][c]=B[maxr][c]
                  B[maxr][c] = temp
  
          # scale the row
          scale = B[r][r]
          for c in range(r,nc):
              B[r][c] = B[r][c]/scale
  
          # eliminate values in the columns
          for rr in range(nr):
              if rr != r:
                  scale = B[rr][r]
                  for c in range(r,nc):
                      B[rr][c]=B[rr][c] - scale*B[r][c]
  
      if (nc == nr+1):
          return B[:,nc-1]
      else:
          return B[:,(nr):nc]
  
  def SimplySupportedBeam(n):
      M = np.zeros([n+1,n+1])
      C = np.array([[0],[150],[0],[0],[0],[0]])
      for r in range(n-3):
          M[r][r] = 1
          M[r][r+1] = -4
          M[r][r+2] = 6
          M[r][r+3] = -4
          M[r][r+4] = 1
  
      M[n-3][1] = 1
      M[n-2][n-1] = 1
  
      M[n-1][n-5] = 1
      M[n-1][n-4] = -2
      M[n-1][n-3] = 1
      M[n][n-2] = 1
      M[n][n-1] = -2
      M[n][n] = 1
  
      A = np.concatenate((M,C), axis=1)
      y0 = GaussElimination(A)
      y = y0[1:n]
      ymax = np.amax(abs(y))
  
      return y, ymax
  
  
  
  n = int(input("Index of the last node: "))
  print (SimplySupportedBeam(n))
  
  plt.figure(1)
  plt.plot(SimplySupportedBeam(n))
  plt.show()
  </code></pre>
  
  <p>How would I plot just the value I get for y from my code?</p>