Skip to content
Snippets Groups Projects
Commit bf8604d5 authored by leufen1's avatar leufen1
Browse files

finetune on plot shape, need to be tested with more competing models but is done for now

parent e369864d
Branches
Tags
3 merge requests!500Develop,!499Resolve "release v2.3.0",!485Resolve "split day ahead in MSE uncertainy plot on distinct plots"
Pipeline #111407 passed
......@@ -1192,8 +1192,9 @@ class PlotSampleUncertaintyFromBootstrap(AbstractPlotClass): # pragma: no cover
else:
xy = (self.model_type_dim, 0) if orientation == "v" else (0, self.model_type_dim)
col_or_row = {"col": self.ahead_dim} if orientation == "v" else {"row": self.ahead_dim}
aspect = 0.4 if orientation == "v" else 5./3.
ax = sns.FacetGrid(data_table.stack(self.model_type_dim).reset_index(), **col_or_row, aspect=aspect, height=5)
aspect = figsize[0] / figsize[1]
height = figsize[1] * 0.8
ax = sns.FacetGrid(data_table.stack(self.model_type_dim).reset_index(), **col_or_row, aspect=aspect, height=height)
ax.map(sns.boxplot, *xy, whis=1.5, color="white", showmeans=True, order=data_table.mean().index.to_list(),
meanprops={"markersize": 6, "markeredgecolor": "k"},
flierprops={"marker": "o", "markerfacecolor": "black", "markeredgecolor": "none", "markersize": 3},
......
......
......@@ -319,8 +319,12 @@ class TrackPlot:
x_max = None
if chain.successor is not None:
stage_count = 0
for e in chain.successor:
if e.stage == stage:
stage_count += 1
if stage_count > 50:
continue
shift = self.width + self.space_intern_x if chain.stage == e.stage else 0
x_tmp = self.plot_track_chain(e, y_pos, x_pos + shift, prev=(x, y),
stage=stage, sparse_conn_mode=sparse_conn_mode)
......
......
......@@ -8,6 +8,7 @@ import logging
import os
import shutil
import time
import sys
from mlair.helpers.datastore import DataStoreByScope as DataStoreObject
from mlair.helpers.datastore import NameNotFoundInDataStore
......@@ -160,8 +161,12 @@ class RunEnvironment(object):
json.dump(tracker, f)
def __plot_tracking(self):
try:
plot_folder, plot_name = os.path.split(self.__find_file_pattern("tracking_%03i.pdf"))
TrackPlot(self.tracker_list, sparse_conn_mode=True, plot_folder=plot_folder, plot_name=plot_name)
except Exception as e:
logging.info(f"Could not plot tracking plot due to:\n{sys.exc_info()[0]}\n"
f"{sys.exc_info()[1]}\n{sys.exc_info()[2]}")
def __find_file_pattern(self, name):
counter = 0
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment