Create a gist now

Instantly share code, notes, and snippets.

@ckunte /dem1cso.csv
Last active Jan 22, 2018

What would you like to do?
DEM-1 SHALL[PS] statements in DEP CSO Offshore Standards
Number DEP SHALL_PS
DEP 37.00.10.14-Gen. Metocean 26
DEP 37.01.10.11-Gen. Fire and Blast 12
DEP 80.00.10.12-Gen. Offshore Layout 11
DEP 37.17.10.11-Gen. Temporary Refuge 23
DEP 37.01.10.11-Gen. Topside Structures 3
DEP 37.19.00.30-Gen. Fixed Steel Structures 4
DEP 37.19.00.14-Gen. Seismic 1
DEP 80.80.00.10-Gen. Life and Rescue Boats 27
#!/usr/bin/env python
# encoding: utf-8
"""
dem1cso.py
Created by ckunte on 01/20/2018.
"""
import numpy as np
import matplotlib.pyplot as plt
data = np.genfromtxt(r'dem1cso.csv',delimiter=',',
names=True,dtype=None)
labels = data['DEP']
sizes = data['SHALL_PS']
plt.style.use('seaborn-pastel')
plt.pie(sizes,labels=labels,autopct='%1.0f%%',
pctdistance=0.54,shadow=False,startangle=315)
centre_circle = plt.Circle((0,0),0.66,fc='white')
fig = plt.gcf()
fig.gca().add_artist(centre_circle)
plt.axis('equal')
plt.savefig('dem1cso_offshore.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment