python data plotting
an introduction
Ian Postuma 18 febbraio 2019
PostDoc @ INFN-PV
python data plotting an introduction Ian Postuma 18 febbraio 2019 - - PowerPoint PPT Presentation
python data plotting an introduction Ian Postuma 18 febbraio 2019 PostDoc @ INFN-PV Content 1. Introduction 2. Experimental data 3. Python 4. Exercise ian.postuma@pv.infn.it 1 Introduction Incipit there are n different ways to analyse
PostDoc @ INFN-PV
ian.postuma@pv.infn.it 1
ian.postuma@pv.infn.it 2
ian.postuma@pv.infn.it 3
Matplotlib Numpy ian.postuma@pv.infn.it 4
ian.postuma@pv.infn.it 5
ian.postuma@pv.infn.it 6
ian.postuma@pv.infn.it 7
ian.postuma@pv.infn.it 8
ian.postuma@pv.infn.it 9
ian.postuma@pv.infn.it 10
ian.postuma@pv.infn.it 10
1 import numpy as np 2 import
matplotlib . pyplot as plt
3 4 data = np . loadtxt ( ” i r .001 ” ,
skiprows =1)
5 6 x = data [ : , 0 ] 7 y = data [ : , 1 ] 8 9
plt . subplots ( 1 , 1 , f i g s i z e = ( 1 2 , 9 ) , dpi =300)
10
plt . t i t l e ( ” i r .001 ” )
11
plt . plot ( x , y , marker= ”o” )
12
plt . ylabel ( ” Signal ( a . u . ) ” )
13
plt . xlabel ( ” TI (ms) ” )
14
plt . ticklabel_format ( axis = ’ y ’ , s t y l e = ’ sci ’ , s c i l i m i t s = ( 0 , 3 ) )
15
plt . show ( ) ian.postuma@pv.infn.it 11
ian.postuma@pv.infn.it 12
ian.postuma@pv.infn.it 12
ian.postuma@pv.infn.it 13
ian.postuma@pv.infn.it 14
ian.postuma@pv.infn.it 14