#!/usr/bin/env python
# coding: utf-8

# In[3]:


import numpy as np
x = np.linspace(-5, 5, 100)
y = 4 * (x**3) + 2 * (x**2) + 5 * x

import matplotlib.pyplot as plt

plt.plot(x, y, color='red', linestyle='--', linewidth=2)
plt.show()


# In[8]:


import numpy as np

rand_int_1 = np.random.randn(100,2)  
print("First array", rand_int_1)

rand_int_2 = np.random.randn(120,2)  
print("Second array", rand_int_2)


# In[26]:


import numpy as np
import matplotlib.pyplot as plt
plt.figure(figsize=(6, 9))

X = np.arange(-5, 5.0, 0.05)

fig, ax = plt.subplots(2, 
           sharex='col', sharey='row')

ax[0].plot(X, f(X), 'bo', X, f(X), 'k')
ax[0].set(title='The function f')

ax[1].plot(X, fp(X), 'go', X, fp(X), 'k')
ax[1].set(xlabel='X Values', ylabel='Y Values',
       title='Derivative Function of f')

plt.show()


# In[2]:


import numpy as np
import matplotlib.pyplot as plt
plt.figure(figsize=(6, 9))

X = np.arange(-5, 5.0, 0.05)

fig, ax = plt.subplots(2, 
           sharex='col', sharey='row')

ax[0].plot(X, f(X), 'r', X, f(X), '*')
ax[0].set(title='The function f')

ax[1].plot(X, fp(X), 'g', X, fp(X), '.')
ax[1].set(xlabel='X Values', ylabel='Y Values',
       title='Derivative Function of f')

plt.scatter()
plt.show()


# In[4]:


import numpy as np
import matplotlib.pyplot as plt

x , y = np.random.rand(100,2)

fig,axes=plt.subplots(ncols=2)
sc1 = axes[0].scatter(x,y, marker="*", color="r")
sc2 = axes[1].scatter(x,y, marker=".", color="g")
axes[0].set(xlabel="dimension 1", ylabel="dimension 2")
axes[1].set(xlabel="dimension 1", ylabel="dimension 2")

axes[0].legend([sc1], ["Admitted"])
axes[1].legend([sc2], ["Not-Admitted"])
plt.show()


# In[ ]:




