Search icon CANCEL
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Matplotlib 2.x By Example

You're reading from  Matplotlib 2.x By Example

Product type Book
Published in Aug 2017
Publisher Packt
ISBN-13 9781788295260
Pages 334 pages
Edition 1st Edition
Languages
Authors (3):
Allen Yu Allen Yu
Profile icon Allen Yu
Claire Chung Claire Chung
Profile icon Claire Chung
Aldrin Yim Aldrin Yim
Profile icon Aldrin Yim
View More author details

Test your skills


Now that we have gone through each style setting one by one, it's your showtime to combine all the techniques!

import matplotlib.pyplot as plt; plt.rcdefaults()
import numpy as np 
import matplotlib as mpl

mpl.style.use('seaborn-darkgrid')

# 2001-2015 per genome sequencing cost in USD
# Adapted from NIH National Human Genome Research Institute figures
# genome.gov/sequencingcosts
# Data were quoted from builtwith.com on May 8th 2017
# Seasonal data were averaged by year for simplicity

# Prepare the data
years = list(range(2001,2016))
y_pos = np.arange(len(years)) 
seqcost = [95263071.92,70175437.42,61448421.50,53751684.08,
40157554.23,28780376.21,\
20442576.14,19934345.74,18519312.16,17534969.56,16159699.44,
16180224.10,\
13801124.19,12585658.90,11732534.52,11455315.22,10474556.36,
9408738.91,\
9047002.97,8927342.14,7147571.39,3063819.99,1352982.23,752079.90,
342502.06,\
232735.44,154713.60,108065.14,70333.33,46774.27,31512.04,31124.96,
29091.73,\
20962.78,16712.01,10496...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}