quadratic equation plot in python

Solutions on MaxInterview for quadratic equation plot in python by the best coders in the world

showing results for - "quadratic equation plot in python"
Sakina
16 Aug 2017
1import matplotlib.pyplot as plt
2import numpy as np
3
4# 100 linearly spaced numbers
5x = np.linspace(0,1,10)
6eta1=0.05
7eta2=0.1
8lmd1= 2.8
9# the function, which is y = x^2 here
10y = 0.5*(-(1/3)*eta1*x**2 + np.sqrt( ((1/3)*eta1*x**2)**2-4*(3*x**2*2.8**2-1)) 
11
12# setting the axes at the centre
13fig = plt.figure()
14ax = fig.add_subplot(1, 1, 1)
15ax.spines['left'].set_position('center')
16ax.spines['bottom'].set_position('zero')
17ax.spines['right'].set_color('none')
18ax.spines['top'].set_color('none')
19ax.xaxis.set_ticks_position('bottom')
20ax.yaxis.set_ticks_position('left')
21
22# plot the function
23plt.plot(x,y, 'r')
24
25# show the plot
26plt.show()
queries leading to this page
points to quadratic equation pythonpython math quadratic equationplot a quadratic programming python solutionquadratic equation in pythonpython solve quadratic equationmatplotlib quadratic equationsolving quadratic equation using pythongraph quadratic matplotlibmatplotlib plot quadraticquadratic equation graph pythonsolve quadratic equation pythonpython quadratic formula graphquadratic equation pythonmatplotlib plot quadratic equationquadratic equation solve in pythonmatplotlib plot quadratic functionpython quadraticplot quadratic equation pythonhow to plot quadratic functions in pythonquadratic graph matplotlibwriting a quadratic equation on pythonpython draw quadratic equationhow to solve quadratic equations use pythonhow to represent quadratic equation in pythonquadratic equation code in pythonquadratic function graph pythonplot quadratic function pythonmatplotlib quadratic plotcode to solve quadratic equation in pythonpython to solve quadratic equationpython quadratic equationhow to code quadratic formula in pythonwriting the quadratic formula in pythonsolving quadratic equations pythonmatplotlib plot f 28x 29plot quadratic function in matplotlibplotting quadratic graphs in pythonhow to create quadratic graphs using pythonquadratic function python plot codehow to solve quadratic equation in pythonplot quadratic equation in pythonplot quadratic equationhow to implement quadratic equation in pythonquadratic plot pythonhow to calculate quadratic equation in pythonsolve quadratic equation in pythonhow to write quadratic equation in pythonquadratic plot matplotlibmatplotlib graph of a quadratic functionpython quadratic function plots quadratic equation plot in python