How to plot a cost funtion

Hello everyone,

I would like to understand how to print the cost function with the python libraries. Every time a graph appears in the notebook I am a bit lost.

I would like to try simple examples of functions, like for example a cost function 3D plot or an expression like f(x)=x².

I recommend this tutorial for how to use matplotlib.
https://matplotlib.org/stable/tutorials/index.html

Hi @TMosh,

Thank you for helping. I found some interesting web pages with simple examples that have allowed me to clarify my doubts.
Some examples
It seems that you have to create a mesh to generate a surface.


image