
# Code source: Óscar Nájera
# License: BSD 3 clause

import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(-1, 2, 100)
y = np.exp(x)

plt.plot(x, y)
plt.xlabel('$x$')
plt.ylabel('$exp(x)$')
plt.show()


# Code source: Óscar Nájera
# License: BSD 3 clause

import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(-1, 2, 100)
y = np.exp(x)

plt.figure()
plt.plot(x, y)
plt.xlabel('$x$')
plt.ylabel('$\exp(x)$')

plt.figure()
plt.plot(x, -np.exp(-x))
plt.xlabel('$x$')
plt.ylabel('$-\exp(-x)$')


plt.show()

Update example for image stacking CSS instuction
Update example for image stacking CSS instuction

  
  # Code source: Óscar Nájera
  # License: BSD 3 clause
  
  import numpy as np
  import matplotlib.pyplot as plt
  
  x = np.linspace(-1, 2, 100)
  y = np.exp(x)
  
+ plt.figure()
  plt.plot(x, y)
  plt.xlabel('$x$')
- plt.ylabel('$exp(x)$')
+ plt.ylabel('$\exp(x)$')
+ 
+ plt.figure()
+ plt.plot(x, -np.exp(-x))
+ plt.xlabel('$x$')
+ plt.ylabel('$-\exp(-x)$')
+ 
+ 
  plt.show()
  
Update example for image stacking CSS instuction
## Code Before:

# Code source: Óscar Nájera
# License: BSD 3 clause

import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(-1, 2, 100)
y = np.exp(x)

plt.plot(x, y)
plt.xlabel('$x$')
plt.ylabel('$exp(x)$')
plt.show()

## Instruction:
Update example for image stacking CSS instuction
## Code After:

# Code source: Óscar Nájera
# License: BSD 3 clause

import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(-1, 2, 100)
y = np.exp(x)

plt.figure()
plt.plot(x, y)
plt.xlabel('$x$')
plt.ylabel('$\exp(x)$')

plt.figure()
plt.plot(x, -np.exp(-x))
plt.xlabel('$x$')
plt.ylabel('$-\exp(-x)$')


plt.show()
