This is an old revision of the document!


Lab 05 - Plotting (Numpy & Matplotlib)

Objectives

  • Offer an introduction to Numpy & matplotlib
  • Get you familiarised with the numpy API
  • Understand basic plotting with matplotlib

Contents

Gnuplot Introduction

Gnuplot is a free, command-driven, interactive, function and data plotting program. It can be downloaded at https://sourceforge.net/projects/gnuplot/. The official Gnuplot documentation can be found at http://gnuplot.sourceforge.net/documentation.html.

It was originally created to allow scientists and students to visualize mathematical functions and data interactively, but has grown to support many non-interactive uses such as web scripting. It is also used as a plotting engine by third-party applications such as Octave.

The command language of Gnuplot is case sensitive, i.e. commands and function names written in lowercase are not the same as those written in capitals. All command names may be abbreviated as long as the abbreviation is not ambiguous. Any number of commands may appear on a line, separated by semicolons (;). Strings may be set off by either single or double quotes, although there are some subtle differences. See syntax (p. 44) and quotes (p. 44) for more details in the Gnuplot documentation (http://gnuplot.sourceforge.net/docs_5.0/gnuplot.pdf).

Commands may extend over several input lines by ending each line but the last with a backslash (\). The backslash must be the last character on each line. The effect is as if the backslash and newline were not there. That is, no white space is implied, nor is a comment terminated.

For built-in help on any topic, type help followed by the name of the topic or help ? to get a menu of available topics.

Tutorial

01. [10p] Basic Plotting

02. [10p] Fitting

03. [10p] Gnuplot Scripts

04. [10p] Animations

Tasks

Google Colab Notebook

For this lab, we will use Google Colab for exploring numpy and matplotlib. Please solve your tasks here by clicking โ€œOpen in Colaboratoryโ€.

You can then export this python notebook as a PDF (File โ†’ Print) and upload it to Moodle.

[10p] Feedback

Please take a minute to fill in the feedback form for this lab.

ep/labs/05.1605018645.txt.gz ยท Last modified: 2020/11/10 16:30 by ioan_adrian.cosma
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0