Skip to content

Instantly share code, notes, and snippets.

@matthew-d-jones
Last active May 12, 2016 14:19
Show Gist options
  • Save matthew-d-jones/3a35f17dc7c4db055e6bc17173283dbe to your computer and use it in GitHub Desktop.
Save matthew-d-jones/3a35f17dc7c4db055e6bc17173283dbe to your computer and use it in GitHub Desktop.
import seaborn as sns
import pandas as pd
import matplotlib.pyplot as pl
df = pd.DataFrame()
df["name"] = ["Protocol Buffers",
"Flat Buffers",
"Apache Avro",
"Apache Thrift",
"BSON"]
df["Message Size (kB)"] = [961, 3128, 1159, 1158, 6034]
df["Encode + Decode Time (ms)"] = [5.296, 1.961, 7.506, 6.548, 22.471]
p = sns.lmplot("Message Size (kB)", "Encode + Decode Time (ms)",
data=df,
fit_reg=False,
#hue="dataset",
scatter_kws={"marker": "D",
"s": 50})
for datapoint in df.get_values():
p.fig.text(datapoint[1]/(6034*1.45)+0.148, datapoint[2]/(22.471*1.345)+0.113, datapoint[0], ha='left', fontsize=10)
pl.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment