Giter VIP home page Giter VIP logo

aspp-2018-dataviz's Introduction

Scientific visualization

Nicolas P. Rougier, G-Node summer school, Camerino, Italy , 2018

Visualisation is a method of computing. It transforms the symbolic into the geometric, enabling researchers to observe their simulations and computations. Visualisation offers a method for seeing the unseen. It enriches the process of scientific discovery and fosters profound and unexpected insights.

โ€” Visualisation in Scientific Computing, NSF report, 1987.

Scientific visualization is classically defined as the process of graphically displaying scientific data. However, this process is far from direct or automatic. There are so many different ways to represent the same data: scatter plots, linear plots, bar plots, and pie charts, to name just a few. Furthermore, the same data, using the same type of plot, may be perceived very differently depending on who is looking at the figure. A more accurate definition for scientific visualization would be a graphical interface between people and data. But remember, there are two people in the loop: the one that produces the visualization and the one that watches it. What you intend to show might be quite different from what will be actually perceived...

The goal of this course is to introduce a few concepts in order for you to achieve better visualization. If you want to go further, you'll have to look at the miscellaneous references given at the end of this document.

Table of Contents

Tutorial

Please go to the Matplotlib tutorial page.

Exercises

Too much ink

Consider the following figure and, using matplotlib, try to remove as much ink as you can while keeping the most relevant information.

You can start from the following python script:

import numpy as np
import matplotlib.pyplot as plt

np.random.seed(123)

def gaussian(x, a, x0, sigma):
    return a*np.exp(-(x-x0)**2/(2*sigma**2))

# Clean data
X = np.linspace(15, 21, 100)
Y = gaussian(X, 0.65, 17.6, 1.)

# Noisy dat
Xn = np.random.uniform(16, 20, 25)
Yn = gaussian(Xn, 0.65, 17.6, 1.) + 0.01 * np.random.normal(size=len(Xn))

The right tool

You have a nice image and you would like to show labeled detailed sub-images alongside the main image (see below). What could be the easiest way to do that ? Be careful with the labels, they must be visible independently of the images color/contrast.

Misleading

What's wrong with this graphic ? How would you correct it ?

Editor's request

Your article just been accepted but the editor request figure 2 to be at least 300 dpi. What does that mean ? What is the minium size (in pixels) of your figure ? Is it relevant if you figure has been saved in vector format ?

Replication

Look at Drawing a brain with Bokeh and try to replicate the final figure using matpltolib.

or

Pick one of your favorite graphic from the litterature and try to replicate it using matplotlib (and fake data).

References

There exist many online resources about scientific visualization and a lot of excellent books as well. Since you probably not have time to read everything, I collected a small set of resources that might be read relatively rapidly.

Made with matplotlib

Courses/Tutorials/Guides

(Some) Tools

Books

Good examples

Bad examples (don't do that at home)

Solutions

  1. exercise-1-sol.py / exercise-1-sol.png (adapted from "Trees, maps, and theorems")
  2. exercise-2-sol.sh or exercise-2-sol.py
  3. exercise-3-sol.py / exercise-3-sol.png (adapted from "The most misleading charts of 2015, fixed")
  4. exercise-4-sol.md or exercise-4-sol.py
  5. exercise-5-sol.py / exercise-5-sol.png

aspp-2018-dataviz's People

Contributors

rougier avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.