Python and Matplotlib Essentials for Scientists and Engineers

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

This book provides an introduction to the core features of the Python programming language and Matplotlib plotting routings for scientists and engineers (or students of either discipline) who want to use Python(TM) to analyse data, simulate physical processes, and render publication-quality plots. No previous programming experience is needed before reading the first page. Readers will learn the core features of the Python programming language in under a day. They will be able to immediately use Python to implement codes that solve their own problems and make beautiful plots and animations. Python code is extremely fast to prototype, allowing users to achieve results quickly and accurately. The examples within the book are available for download at http: //pythonessentials.com. Python and Matplotlib Essentials for Scientists and Engineers is accessible for motivated high-school students, but will likely be most useful for undergraduate and graduate students as well as working professionals who have some background with the basic mathematical concepts. This book is intended for technical people who want to get things done.

Author(s): Matt A. Wood
Publisher: Morgan & Claypool
Year: 2015

Language: English
Pages: 135

Title
Copyright
Dedication
Contents
Preface
Acknowledgements
About the author
1 Introduction: why Python and Matplotlib?
1.1 Numerical analysis and publication-quality plots
1.2 Enter Python
1.3 Resources
2 Downloading and installation
3 First steps
3.1 Working with strings
3.1.1 Hello, World!
3.1.2 Introduction to string methods
3.1.3 String concatenation
3.1.4 Slicing strings
3.1.5 Example: a sequence of file names
3.1.6 Error messages
3.2 Accessing user input
3.3 Your first Python program file
4 Working with numbers
4.1 A powerful calculator
4.2 Lists, tuples and arrays
4.2.1 Lists
4.2.2 Slicing lists
4.2.3 List comprehension
4.2.4 Tuples
4.2.5 Lists caution #1: copying lists
4.2.6 Lists caution #2: multiplying lists by a constant
5 NumPy arrays
5.1 Creating and reshaping arrays
5.1.1 NumPy arange
5.1.2 NumPy linspace
5.1.3 Other array creation methods
5.2 Basic operations with arrays
5.2.1 Copying arrays
5.3 Dictionaries
5.4 Basic statistics
5.5 Universal functions
5.6 Precision and round-off error
5.7 NumPy matrix objects
6 File input and output
6.1 Reading from a file
6.1.1 General form: numbers and text
6.1.2 NumPy loadtxt and genfromtxt
6.1.3 Reading and working with dates and times
6.1.4 Reading files with Astropy
6.2 Writing to a file
6.2.1 Formatted output
6.2.2 Writing text and numbers to a file
6.2.3 NumPy savetxt
6.2.4 Astropy write
7 Simple programing: flow control
7.1 Conditionals
7.2 if-elif-else statements
7.3 for loops
7.4 while statements
7.5 break, continue and pass statements
8 Functions and modules
8.1 Introduction: coding best practices
8.2 Simple Python functions and modules
8.3 Functions with keyword arguments
8.4 Functional programming: list comprehension, lambda, map and filter
8.4.1 Introduction
8.4.2 List comprehension and generator comprehension
8.4.3 The lambda function
8.4.4 The map function
8.4.5 The filter function
9 Classes and class methods
9.1 Introduction
9.2 Class attributes
9.3 Copying and deep copying
9.4 Methods
10 Making plots with Matplotlib
10.1 Simple line and point plots
10.2 Including error bars
10.3 Multiple plots on a page
10.4 Histogram plots
10.5 Quick and easy plotting routines for two-column data
10.6 Customization: text on plots, rc params and inset figures
10.7 Image plots with imshow
10.8 3D plots
10.8.1 3D scatter plots
10.8.2 3D wireframe and surface plots
11 Applications
11.1 Fits to data
11.1.1 Linear least squares: fitting a polynomial
11.1.2 Non-linear least squares
11.1.3 Linear systems of equations
11.2 Numerical integration
11.3 Integrating ordinary differential equations
11.4 Fourier transforms
11.5 Writing sound files
12 Visualization and animations
12.1 VPython
12.2 Making figures with Mayavi
12.3 Animations
13 Interfacing with other languages