Created
February 28, 2014 19:04
-
-
Save shahifaqeer/9277504 to your computer and use it in GitHub Desktop.
abhinav's box plot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
import pandas as pd | |
import decimal | |
data = {'x': [27, 32, 32, 42, 42, 42, 47, 47,47,47,47, 51, 57,57,57,57,57, 62,62,62,62,62,62,62,62], | |
'y': [48, 62, 36.7, 60, 38.4, 67, 62.4, 12.5, 54, 62, 105.9, NaN, 63.8, 66, 66.2, 58.6, 112.3, 50, 91, 49.9, 62.3, 71.6, 104.6, 122.6, 110.1]} | |
df = pd.DataFrame(data) | |
tick = ['26-30', '31-35', '40-45', '46-50', '51-55', '56-60', '61-65'] | |
tick2 = [] | |
for x in tick: | |
y = x.split('-') | |
a = '{0:3.2e}'.format(int(y[0])/(1400*8)) | |
b = '{0:3.2e}'.format(int(y[1])/(1400*8)) | |
z = str(a[:4])+'-'+str(b[:4]) | |
tick2.append(z) | |
df.boxplot(by='x') | |
xticks(arange(1,8), tick2, rotation=30) | |
title('') | |
suptitle("") | |
xlabel('L1 distance (x$10^{-2}$)') | |
ylabel('Throughput(Bytes/s)') | |
savefig('/home/sarthak/Desktop/fig1.pdf') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment