T
T
Timebird2016-08-05 22:04:44
Python
Timebird, 2016-08-05 22:04:44

How to get a smooth graph of a function?

I have a function, I need to smooth it. What is the best way to do this?

def buildgraph_probs(array1, array2, axe_x_name, axe_y_name, name, num):

    plt.figure(num)
    plt.plot(array1, array2)
    plt.xlabel('{0:s}'.format(axe_x_name))
    plt.ylabel('{0:s}'.format(axe_y_name))
    plt.title('Probability_{0:s}'.format(name))
    plt.savefig('Probability_{0:s}.png'.format(name))

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question