Skip to content
Snippets Groups Projects
Commit dd8aca5a authored by Michael Reuscher's avatar Michael Reuscher
Browse files

new plot

parent a2fc93fe
No related branches found
No related tags found
1 merge request!4Python driver and data analysis part
...@@ -64,5 +64,59 @@ ...@@ -64,5 +64,59 @@
"-n": "100", "-n": "100",
"-s": "12M", "-s": "12M",
"-i": "0.1s", "-i": "0.1s",
"-N": "4"},
"data_set_12":{
"--posixDataDir": "protokoll",
"-n": "100",
"-s": "600",
"-i": "0.1s",
"-N": "4"},
"data_set_13":{
"--posixDataDir": "protokoll",
"-n": "100",
"-s": "1200",
"-i": "0.1s",
"-N": "4"},
"data_set_14":{
"--posixDataDir": "protokoll",
"-n": "100",
"-s": "2400",
"-i": "0.1s",
"-N": "4"},
"data_set_15":{
"--posixDataDir": "protokoll",
"-n": "100",
"-s": "4800",
"-i": "0.1s",
"-N": "4"},
"data_set_16":{
"--posixDataDir": "protokoll",
"-n": "100",
"-s": "9600",
"-i": "0.1s",
"-N": "4"},
"data_set_17":{
"--posixDataDir": "protokoll",
"-n": "100",
"-s": "60000",
"-i": "0.1s",
"-N": "4"},
"data_set_18":{
"--posixDataDir": "protokoll",
"-n": "100",
"-s": "120000",
"-i": "0.1s",
"-N": "4"},
"data_set_19":{
"--posixDataDir": "protokoll",
"-n": "100",
"-s": "240000",
"-i": "0.1s",
"-N": "4"},
"data_set_20":{
"--posixDataDir": "protokoll",
"-n": "100",
"-s": "480000",
"-i": "0.1s",
"-N": "4"} "-N": "4"}
} }
\ No newline at end of file
import numpy as np import numpy as np
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import seaborn as sns import seaborn as sns
import pandas as pd
from scipy.stats import iqr from scipy.stats import iqr
sns.set_theme()
class SeabornPlotter: class SeabornPlotter:
...@@ -10,19 +12,26 @@ class SeabornPlotter: ...@@ -10,19 +12,26 @@ class SeabornPlotter:
self.name = name self.name = name
self.current_plot = None self.current_plot = None
def configure_plot(self, ax):
#ax.set_xscale('log')
if self.name == "idle" or self.name == "wait":
ax.set_yscale('symlog', linthresh=0.1)
else:
ax.set_yscale('log')
def plot(self): def plot(self):
df = self.dataframe df = self.dataframe
x = df['size'] x = df['size']
y = df['duration'] y = df['duration']
title = "Procedure: {}".format(self.name) title = "Procedure: {}".format(self.name)
f, ax = plt.subplots(figsize=(16, 9)) f, ax = plt.subplots(figsize=(32, 18))
sns.violinplot(x=x, y=y, s=5, color=".15", palette="light:b", cut=0, inner="points", sns.boxplot(x=x, y=y, color=".15", palette="light:b")
hue=list(self.dataframe.index.get_level_values(0)))
if self.name == "dump" or self.name == "write" or self.name == "open" or self.name == "wait": self.configure_plot(ax)
ax.set_yscale('symlog', linthresh=0.1)
else:
ax.set_yscale('log')
plt.title(title) plt.title(title)
plt.xlabel("Size of written data in ms") plt.xlabel("Size of written data in ms")
...@@ -31,3 +40,10 @@ class SeabornPlotter: ...@@ -31,3 +40,10 @@ class SeabornPlotter:
plt.show() plt.show()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment