What do you want to save?
Add Code snippet
New code examples
-
Python 2022-02-11 10:25:01
quadratic equation plot in python
import matplotlib.pyplot as plt import numpy as np # 100 linearly spaced numbers x = np.linspace(0,1,10) eta1=0.05 eta2=0.1 lmd1= 2.8 # the function, which is y = x^2 here y = 0.5*(-(1/3)*eta1*x**2 + np.sqrt( ((1/3)*eta1*x**2)**2-4*(3*x**2*2.8**2-1)) #... Add solution -
Python 2022-01-26 00:01:21
matplotlib: use colormaps for line plot colors
import numpy as np import matplotlib.pylab as plt plt.rcParams["figure.figsize"] = [7, 7] plt.rcParams["figure.autolayout"] = True x = np.array([0,1]) y = np.array([1,1]) n = 50 colors = plt.cm.hsv(np.linspace(0, 1, n)) for i in range(... Add solution -
Python 2021-08-31 10:55:04
matplotlib plt.sapect
plt.figure(figsize=(10,3)) plt.plot(x,y) plt.show() Add solution