Question
Help edit my Python codes. It does not plot the required graph. Thanks in advance. # Import libraries import matplotlib.pyplot as plt import numpy as
Help edit my Python codes. It does not plot the required graph. Thanks in advance.
# Import libraries import matplotlib.pyplot as plt import numpy as np import math
#Constants h1=(6.626e-34/2*math.pi) m= 500 m1=str(m) k1=0.3 q1=1.5 c=(math.pow(h1,2)/(4*math.pow(m1,2)*math.pow(q1,4))) c1=int(c)
#Values for x and t x = np.linspace(-300, 300, 500)
t = np.linspace(0, 200, 100)
# Creating vectors X and Y x = np.linspace(-2, 2, 100) y_p = (1/((1+c1*t**2)**(1/2)))*(math.exp(-((x-(h1*k1*t/m1))**2/(2*q1**2(1+c1*t**2))))) y=str(y_p)
fig = plt.figure(figsize = (12, 7)) # Create the plot plt.plot(x, y, alpha = 0.4, label ='Y', color ='red', linestyle ='dashed', linewidth = 2, marker ='D', markersize = 5, markerfacecolor ='blue', markeredgecolor ='blue')
# Add X and y Label plt.xlabel('x axis') plt.ylabel('y axis')
# Add Text watermark fig.text(0.9, 0.15, 'Jeeteshgavande30', fontsize = 12, color ='green', ha ='right', va ='bottom', alpha = 0.7)
# Add a grid plt.grid(alpha =.6, linestyle ='--')
# Add a Legend plt.legend()
# Show the plot plt.show()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started