
import numpy as np
import matplotlib.pyplot as plt

from mpltools import special

x = np.linspace(0, 2 * np.pi)
y_sin = np.sin(x)
y_cos = np.cos(x)

y_err = 0.2
special.errorfill(x, y_sin, y_err, label='blue', label_fill='blue error')
special.errorfill(x, y_cos, y_err, label='red', label_fill='red error',
                  alpha_fill=0.1)
plt.legend()

plt.show()



import numpy as np
import matplotlib.pyplot as plt

from mpltools import special

x = np.linspace(0, 2 * np.pi)
y_sin = np.sin(x)
y_cos = np.cos(x)

y_err = 0.2
special.errorfill(x, y_sin, y_err, label='sin', label_fill='sin error')
special.errorfill(x, y_cos, y_err, label='cos', label_fill='cos error',
                  alpha_fill=0.1)
plt.legend()

plt.show()


Fix labeling on plots so it matches elements.
DOC: Fix labeling on plots so it matches elements.

  
  import numpy as np
  import matplotlib.pyplot as plt
  
  from mpltools import special
  
  x = np.linspace(0, 2 * np.pi)
  y_sin = np.sin(x)
  y_cos = np.cos(x)
  
  y_err = 0.2
- special.errorfill(x, y_sin, y_err, label='blue', label_fill='blue error')
+ special.errorfill(x, y_sin, y_err, label='sin', label_fill='sin error')
- special.errorfill(x, y_cos, y_err, label='red', label_fill='red error',
+ special.errorfill(x, y_cos, y_err, label='cos', label_fill='cos error',
                    alpha_fill=0.1)
  plt.legend()
  
  plt.show()
  
  
Fix labeling on plots so it matches elements.
## Code Before:

import numpy as np
import matplotlib.pyplot as plt

from mpltools import special

x = np.linspace(0, 2 * np.pi)
y_sin = np.sin(x)
y_cos = np.cos(x)

y_err = 0.2
special.errorfill(x, y_sin, y_err, label='blue', label_fill='blue error')
special.errorfill(x, y_cos, y_err, label='red', label_fill='red error',
                  alpha_fill=0.1)
plt.legend()

plt.show()


## Instruction:
Fix labeling on plots so it matches elements.
## Code After:

import numpy as np
import matplotlib.pyplot as plt

from mpltools import special

x = np.linspace(0, 2 * np.pi)
y_sin = np.sin(x)
y_cos = np.cos(x)

y_err = 0.2
special.errorfill(x, y_sin, y_err, label='sin', label_fill='sin error')
special.errorfill(x, y_cos, y_err, label='cos', label_fill='cos error',
                  alpha_fill=0.1)
plt.legend()

plt.show()

