fordatascientist - python matplotlib

20
LEZIONE 1.. PYTHON AVANZATO libreria MATPLOTLIB

Upload: annalisa-vignoli

Post on 20-Jan-2017

107 views

Category:

Data & Analytics


2 download

TRANSCRIPT

Page 1: ForDataScientist - Python matplotlib

LEZIONE 1..PYTHON AVANZATOlibreria

MATPLOTLIB

Page 2: ForDataScientist - Python matplotlib

Riepilogo lezione precedente

SeriesMultiIndex

DataFrame

.groupby

.map

.apply

.merge

.stuck

.unstuck

.loc .idx

.index

.columns

.shift

.concat

Page 3: ForDataScientist - Python matplotlib

Linguaggio di programmazione

Graphical User Interface

GUI

Esistono diverse interfacce utente per produrre grafici e immagini

Page 4: ForDataScientist - Python matplotlib

GUI

Page 5: ForDataScientist - Python matplotlib

Linguaggio di programmazione

Page 6: ForDataScientist - Python matplotlib

PAGINPAGINAHTML

Inte

rfac

cia

uten

te P

rogr

am.

GU

I FILE RASTER

.png.jpeg.gif

FILE VETTORIALE

.svg

LIBRERIE GRAFICHE

INTERFACCIA GRAFICA

(parte inferiore della cella code)

IL MONDO DELLA GRAFICAUn’immagine è prodotta tramite l’accensione sul video di tanti pixel di colori diversi

Page 7: ForDataScientist - Python matplotlib

Matplotlib

è una libreria python per grafici 2D. Ogni aspetto del grafico può essere controllato tramite codice.

Matplotlib mette a disposizione comandi macro per l'esecuzione di specifici gruppi di comandi elementari.

LIBRERIE GRAFICHE

PRIMITIVE MATPLOTLIB

MACRO PYPLOT

MetodiPandas

Page 8: ForDataScientist - Python matplotlib

LEZIONE 1..www.fordatascientist.org

F00-PyGraphF20-Matplotlib-Introduction.ipynb

Page 9: ForDataScientist - Python matplotlib

.pyplot .add_axes

.plot.rcParams

parametri di base

.figure

Page 10: ForDataScientist - Python matplotlib

Struttura di una figure

figure

mis

ura

in p

ollic

i

misura in pollici

Axes

Axes

0

1

0 1

yasi

s

xasis

major ticksminor ticks

Legend

yasi

s

xasis

Page 11: ForDataScientist - Python matplotlib

LEZIONE 1..www.fordatascientist.org

F00-PyGraphF23-Pyplot-Subplot.ipynb

Page 12: ForDataScientist - Python matplotlib

LEZIONE 1..www.fordatascientist.org

F00-PyGraphF35-Matplotlib-Axis.ipynb

Page 13: ForDataScientist - Python matplotlib

.xaxis .add_subplot

.set_title.yaxis .title.set_text

title.get_text

.set_label_text

.get_label_text

.spines{}

.set_xlabel

.set_position SET

GET

.set_ticks .get_major_ticks

Page 14: ForDataScientist - Python matplotlib

Grafico della piramide della popolazione

7 po

llici

7 pollici

0.15

0.10

0.7

5

0.10

0.45 0.45

barh barhspinesnon visibili

Page 15: ForDataScientist - Python matplotlib

LEZIONE 1..www.fordatascientist.org

F00-PyGraphF40-PopulationPyramid.ipynb

Page 16: ForDataScientist - Python matplotlib

Grafico tachimetropatches.Wedge

sen

cos

Page 17: ForDataScientist - Python matplotlib

LEZIONE 1..www.fordatascientist.org

F00-PyGraphF41-Tachometer.ipynb

Page 18: ForDataScientist - Python matplotlib

Metodo plot delle classe Series

.plot( kind='line'/’bar’/’barh’/’hist’/’’box’/’area’/’pie’, secondary_y=False,

ax=None, figsize=None, title=None, grid=None, legend=False, style=None, xticks=None, yticks=None, xlim=None, ylim=None, fontsize=None, colormap=None, label=None,

**kwds )

Page 19: ForDataScientist - Python matplotlib

LEZIONE 1..www.fordatascientist.org

F00-PyGraphF25-Pandas-Plot.ipynb

Page 20: ForDataScientist - Python matplotlib

CONTATTI TELEFONO

051 22 35 20

EMAIL [email protected]