Reader small image

You're reading from  IPython Notebook Essentials

Product typeBook
Published inNov 2014
Publisher
ISBN-139781783988341
Edition1st Edition
Tools
Right arrow
Author (1)
Luiz Felipe Martins
Luiz Felipe Martins
author image
Luiz Felipe Martins

Luiz Felipe Martins holds a PhD in applied mathematics from Brown University and has worked as a researcher and educator for more than 20 years. His research is mainly in the field of applied probability. He has been involved in developing code for the open source homework system, WeBWorK, where he wrote a library for the visualization of systems of differential equations. He was supported by an NSF grant for this project. Currently, he is an Associate Professor in the Department of Mathematics at Cleveland State University, Cleveland, Ohio, where he has developed several courses in applied mathematics and scientific computing. His current duties include coordinating all first-year calculus sessions.
Read more about Luiz Felipe Martins

Right arrow

The plot function


The plot() function is the workhorse of the matplotlib library. In this section, we will explore the line-plotting and formatting capabilities included in this function.

To make things a bit more concrete, let's consider the formula for logistic growth, as follows:

This model is frequently used to represent growth that shows an initial exponential phase, and then is eventually limited by some factor. The examples are the population in an environment with limited resources and new products and/or technological innovations, which initially attract a small and quickly growing market but eventually reach a saturation point.

A common strategy to understand a mathematical model is to investigate how it changes as the parameters defining it are modified. Let's say, we want to see what happens to the shape of the curve when the parameter b changes.

To be able to do what we want more efficiently, we are going to use a function factory. This way, we can quickly create logistic models...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
IPython Notebook Essentials
Published in: Nov 2014Publisher: ISBN-13: 9781783988341

Author (1)

author image
Luiz Felipe Martins

Luiz Felipe Martins holds a PhD in applied mathematics from Brown University and has worked as a researcher and educator for more than 20 years. His research is mainly in the field of applied probability. He has been involved in developing code for the open source homework system, WeBWorK, where he wrote a library for the visualization of systems of differential equations. He was supported by an NSF grant for this project. Currently, he is an Associate Professor in the Department of Mathematics at Cleveland State University, Cleveland, Ohio, where he has developed several courses in applied mathematics and scientific computing. His current duties include coordinating all first-year calculus sessions.
Read more about Luiz Felipe Martins