Refactoring oml_plot.py