Commit f1c83e0d authored by Jaime Arias's avatar Jaime Arias
Browse files

fix: same scale for all the figures

parent 8bb5acba
This diff is collapsed.
......@@ -4,6 +4,13 @@
# In[1]:
ZERO = 10e-5
TIMEOUT = 10 * 60 # 10 minutes = 600 seconds
# In[2]:
import os
import pandas as pd
import numpy as np
......@@ -49,7 +56,7 @@ LAYOUT_FIGURES = dict(
# # Auxiliary Functions
# In[2]:
# In[3]:
def create_folder(path):
......@@ -69,7 +76,7 @@ def create_folder(path):
os.makedirs(path)
# In[3]:
# In[4]:
def create_figure(df, model):
......@@ -108,7 +115,7 @@ def create_figure(df, model):
return figure
# In[4]:
# In[5]:
def get_axis_title(experiment, show_strategy=True):
......@@ -160,7 +167,7 @@ def get_axis_title(experiment, show_strategy=True):
return title
# In[5]:
# In[6]:
def create_log_figure(table, table_errors, model, tool_x, tool_y, show_strategy=True, callback=None):
......@@ -198,13 +205,10 @@ def create_log_figure(table, table_errors, model, tool_x, tool_y, show_strategy=
>>> fig = create_log_figure(table['time'], table['error'], 'philo10', 'pmc-sog_otfL_couv99-default_1_8', 'pmc-sog_otfP_couv99-default_1_8')
"""
try:
min_values = table.loc[model].min()
max_values = table.loc[model].max()
min_value = min(min_values[tool_x], min_values[tool_y])/2.
min_value = ZERO
max_value = TIMEOUT
min_value_log = np.log10(min_value)
max_value = max(max_values[tool_x], max_values[tool_y])
max_value_log = np.log10(max_value)
table_model = table.loc[model]
......@@ -284,7 +288,7 @@ def create_log_figure(table, table_errors, model, tool_x, tool_y, show_strategy=
print(e)
# In[6]:
# In[7]:
import webbrowser
......@@ -399,7 +403,7 @@ myPlot.on('plotly_click', function(data){
"""
# In[7]:
# In[8]:
def create_figure_explored_states(table_explored_states, model):
......@@ -654,13 +658,6 @@ table.head()
# In[14]:
ZERO = 10e-5
TIMEOUT = 10 * 60 # 10 minutes = 600 seconds
# In[15]:
# table with times for each experiment
table_time = table['time'].copy()
......@@ -676,7 +673,7 @@ table_time = pd.concat([table_time, p_df], axis=1)
table_time.head()
# In[16]:
# In[15]:
# table with verification output for each experiment
......@@ -691,7 +688,7 @@ table_property = pd.concat([table_property, p_df], axis=1)
table_property.head()
# In[17]:
# In[16]:
# table with error for each experiment
......@@ -700,7 +697,7 @@ table_error = table['error'].copy()
table_error.head()
# In[18]:
# In[17]:
# table with explored states for each experiment using ltsmin
......@@ -718,7 +715,7 @@ table_explored_states = table_explored_states.reset_index()
table_explored_states.head()
# In[19]:
# In[18]:
# calculate the stats of the number of explored states
......@@ -730,19 +727,19 @@ table_explored_states_stats.head()
# # Examples
# In[20]:
# In[19]:
create_figure_explored_states(table_explored_states, 'spool1')
# In[21]:
# In[20]:
create_figure(df, "spool1")
# In[22]:
# In[ ]:
create_log_figure(table_time, table_error, "spool1", "pmc-sog_otf_couv99-default_2_16", "pnml2lts-mc_dfs_1_16", True, open_logs_callback)
......@@ -750,7 +747,7 @@ create_log_figure(table_time, table_error, "spool1", "pmc-sog_otf_couv99-default
# # Generate Figures
# In[23]:
# In[ ]:
# models
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment