Apr-02-2020, 08:07 PM
(This post was last modified: Apr-02-2020, 08:08 PM by medatib531.)
Hello,
suppose I have the following dataset as represented in the code.
This dataset is coming from measurements which are sometimes inconsistent and there are some "peaks" in the curve.
Is there any way to smoothe the curve?
suppose I have the following dataset as represented in the code.
This dataset is coming from measurements which are sometimes inconsistent and there are some "peaks" in the curve.
Is there any way to smoothe the curve?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import matplotlib as mpl from matplotlib import pyplot as plt y = [ 0.008000000000000002 , 0.007600000000000001 , 0.010200000000000002 , 0.010100000000000001 , 0.0097 , 0.010299999999999998 , 0.0113 ] x = [ 10 , 20 , 40 , 80 , 160 , 320 , 640 ] plt.rc( 'font' , family = 'serif' , size = '10' ) fig, ax1 = plt.subplots() ax1.plot(x,y,linewidth = 1 ) ax1.set_xscale( 'log' ) ax1.set_yscale( 'log' ) plt.show() |