prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Contours in mpl_2D seem to have shape problem. 
  I'm running the following script
  ```
  import WrightTools as wt
  
  p = '000.data'
  d = wt.data.from_PyCMDS(p)
  d.signal_ratio.clip(zmin=-4, zmax=4)
  d.signal_ratio.znull = 0
  d.signal_ratio.signed = True
  d.signal_ratio._update()
  
  art = wt.artists.mpl_2D(d)
  art.plot(channel='signal_ratio', contours=9)
  ```
  using the dataset found in `'Google Drive/MX2/CMDS/2017-08-07/p-CMDS-p/0ps 51 [w2, w1]'`. I get the following error.
  ```
  Traceback (most recent call last):
  
    File "<ipython-input-98-92c093c4abb1>", line 1, in <module>
      runfile('/Users/darienmorrow/Google Drive/MX2/CMDS/2017-08-07/p-CMDS-p/0ps 51 [w2, w1]/workup.py', wdir='/Users/darienmorrow/Google Drive/MX2/CMDS/2017-08-07/p-CMDS-p/0ps 51 [w2, w1]')
  
    File "/Users/darienmorrow/anaconda/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile
      execfile(filename, namespace)
  
    File "/Users/darienmorrow/anaconda/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile
      exec(compile(f.read(), filename, 'exec'), namespace)
  
    File "/Users/darienmorrow/Google Drive/MX2/CMDS/2017-08-07/p-CMDS-p/0ps 51 [w2, w1]/workup.py", line 15, in <module>
      art.plot(channel='signal_ratio', contours=9, contours_local=False)
  
    File "/Users/darienmorrow/source/WrightTools/WrightTools/artists.py", line 1858, in plot
      subplot_main.contour(X, Y, zi, contours_levels, colors='k')
  
    File "/Users/darienmorrow/anaconda/lib/python3.6/site-packages/matplotlib/__init__.py", line 1892, in inner
      return func(ax, *args, **kwargs)
  
    File "/Users/darienmorrow/anaconda/lib/python3.6/site-packages/matplotlib/axes/_axes.py", line 5819, in contour
      contours = mcontour.QuadContourSet(self, *args, **kwargs)
  
    File "/Users/darienmorrow/anaconda/lib/python3.6/site-packages/matplotlib/contour.py", line 864, in __init__
      self._process_args(*args, **kwargs)
  
    File "/Users/darienmorrow/anaconda/lib/python3.6/site-packages/matplotlib/contour.py", line 1429, in _process_args
      x, y, z = self._contour_args(args, kwargs)
  
    File "/Users/darienmorrow/anaconda/lib/python3.6/site-packages/matplotlib/contour.py", line 1508, in _contour_args
      x, y, z = self._check_xyz(args[:3], kwargs)
  
    File "/Users/darienmorrow/anaconda/lib/python3.6/site-packages/matplotlib/contour.py", line 1566, in _check_xyz
      "{0} instead of {1}.".format(x.shape, z.shape))
  
  TypeError: Shape of x does not match that of z: found (52, 52) instead of (51, 51).
  ```
  
  
  </issue>
  <code>
  [start of examples/rRaman.py]
  1 # -*- coding: utf-8 -*-
  2 """
  3 Resonance Raman
  4 ==========
  5 
  6 A Resonance Raman plot.
  7 """
  8 
  9 import WrightTools as wt
  10 from WrightTools import datasets
  11 
  12 p = datasets.BrunoldrRaman.LDS821_514nm_80mW
  13 data = wt.data.from_BrunoldrRaman(p)
  14 trash_pixels = 56
  15 data = data.split(0, 843.0)[1]
  16 
  17 data.convert('wn', verbose=False)
  18 
  19 artist = wt.artists.mpl_1D(data)
  20 d = artist.plot()
  21
  [end of examples/rRaman.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/examples/rRaman.py b/examples/rRaman.py
  --- a/examples/rRaman.py
  +++ b/examples/rRaman.py
  @@ -1,7 +1,7 @@
   # -*- coding: utf-8 -*-
   """
   Resonance Raman
  -==========
  +===============
   
   A Resonance Raman plot.
   """
  
verification_info: {"golden_diff": "diff --git a/examples/rRaman.py b/examples/rRaman.py\n--- a/examples/rRaman.py\n+++ b/examples/rRaman.py\n@@ -1,7 +1,7 @@\n # -*- coding: utf-8 -*-\n \"\"\"\n Resonance Raman\n-==========\n+===============\n \n A Resonance Raman plot.\n \"\"\"\n", "issue": "Contours in mpl_2D seem to have shape problem. \nI'm running the following script\r\n```\r\nimport WrightTools as wt\r\n\r\np = '000.data'\r\nd = wt.data.from_PyCMDS(p)\r\nd.signal_ratio.clip(zmin=-4, zmax=4)\r\nd.signal_ratio.znull = 0\r\nd.signal_ratio.signed = True\r\nd.signal_ratio._update()\r\n\r\nart = wt.artists.mpl_2D(d)\r\nart.plot(channel='signal_ratio', contours=9)\r\n```\r\nusing the dataset found in `'Google Drive/MX2/CMDS/2017-08-07/p-CMDS-p/0ps 51 [w2, w1]'`. I get the following error.\r\n```\r\nTraceback (most recent call last):\r\n\r\n  File \"<ipython-input-98-92c093c4abb1>\", line 1, in <module>\r\n    runfile('/Users/darienmorrow/Google Drive/MX2/CMDS/2017-08-07/p-CMDS-p/0ps 51 [w2, w1]/workup.py', wdir='/Users/darienmorrow/Google Drive/MX2/CMDS/2017-08-07/p-CMDS-p/0ps 51 [w2, w1]')\r\n\r\n  File \"/Users/darienmorrow/anaconda/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py\", line 866, in runfile\r\n    execfile(filename, namespace)\r\n\r\n  File \"/Users/darienmorrow/anaconda/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py\", line 102, in execfile\r\n    exec(compile(f.read(), filename, 'exec'), namespace)\r\n\r\n  File \"/Users/darienmorrow/Google Drive/MX2/CMDS/2017-08-07/p-CMDS-p/0ps 51 [w2, w1]/workup.py\", line 15, in <module>\r\n    art.plot(channel='signal_ratio', contours=9, contours_local=False)\r\n\r\n  File \"/Users/darienmorrow/source/WrightTools/WrightTools/artists.py\", line 1858, in plot\r\n    subplot_main.contour(X, Y, zi, contours_levels, colors='k')\r\n\r\n  File \"/Users/darienmorrow/anaconda/lib/python3.6/site-packages/matplotlib/__init__.py\", line 1892, in inner\r\n    return func(ax, *args, **kwargs)\r\n\r\n  File \"/Users/darienmorrow/anaconda/lib/python3.6/site-packages/matplotlib/axes/_axes.py\", line 5819, in contour\r\n    contours = mcontour.QuadContourSet(self, *args, **kwargs)\r\n\r\n  File \"/Users/darienmorrow/anaconda/lib/python3.6/site-packages/matplotlib/contour.py\", line 864, in __init__\r\n    self._process_args(*args, **kwargs)\r\n\r\n  File \"/Users/darienmorrow/anaconda/lib/python3.6/site-packages/matplotlib/contour.py\", line 1429, in _process_args\r\n    x, y, z = self._contour_args(args, kwargs)\r\n\r\n  File \"/Users/darienmorrow/anaconda/lib/python3.6/site-packages/matplotlib/contour.py\", line 1508, in _contour_args\r\n    x, y, z = self._check_xyz(args[:3], kwargs)\r\n\r\n  File \"/Users/darienmorrow/anaconda/lib/python3.6/site-packages/matplotlib/contour.py\", line 1566, in _check_xyz\r\n    \"{0} instead of {1}.\".format(x.shape, z.shape))\r\n\r\nTypeError: Shape of x does not match that of z: found (52, 52) instead of (51, 51).\r\n```\r\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\nResonance Raman\n==========\n\nA Resonance Raman plot.\n\"\"\"\n\nimport WrightTools as wt\nfrom WrightTools import datasets\n\np = datasets.BrunoldrRaman.LDS821_514nm_80mW\ndata = wt.data.from_BrunoldrRaman(p)\ntrash_pixels = 56\ndata = data.split(0, 843.0)[1]\n\ndata.convert('wn', verbose=False)\n\nartist = wt.artists.mpl_1D(data)\nd = artist.plot()\n", "path": "examples/rRaman.py"}]}