#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 21 10:42:40 2019
@author: dhigley
Routines for setting plot parameters for different contexts
"""

import matplotlib.pyplot as plt


def init_paper():
    plt.rcParams["figure.figsize"] = (3.37, 4)
    plt.rcParams["font.size"] = 8
    # plt.rcParams['font.family'] = 'Times'
    plt.rcParams["axes.labelsize"] = plt.rcParams["font.size"] * 1
    plt.rcParams["axes.titlesize"] = plt.rcParams["font.size"] * 1
    plt.rcParams["legend.fontsize"] = plt.rcParams["font.size"]
    plt.rcParams["xtick.labelsize"] = plt.rcParams["font.size"]
    plt.rcParams["ytick.labelsize"] = plt.rcParams["font.size"]
    # plt.rcParams['savefig.dpi'] = 2*plt.rcParams['savefig.dpi']
    plt.rcParams["xtick.major.size"] = 3
    plt.rcParams["xtick.minor.size"] = 3
    plt.rcParams["xtick.major.width"] = 1
    plt.rcParams["xtick.minor.width"] = 1
    plt.rcParams["ytick.major.size"] = 3
    plt.rcParams["ytick.minor.size"] = 3
    plt.rcParams["ytick.major.width"] = 1
    plt.rcParams["ytick.minor.width"] = 1
    plt.rcParams["legend.frameon"] = False
    plt.rcParams["legend.loc"] = "center left"
    plt.rcParams["axes.linewidth"] = 0.5
    plt.rcParams["lines.linewidth"] = 2
    plt.rcParams["legend.numpoints"] = 1
    plt.rcParams["legend.scatterpoints"] = 1


def init_paper_small():
    # Same as init_paper, but with small lines
    plt.rcParams["figure.figsize"] = (3.37, 4)
    plt.rcParams["font.size"] = 8
    # plt.rcParams['font.family'] = 'Times'
    plt.rcParams["axes.labelsize"] = plt.rcParams["font.size"] * 1
    plt.rcParams["axes.titlesize"] = plt.rcParams["font.size"] * 1
    plt.rcParams["legend.fontsize"] = plt.rcParams["font.size"]
    plt.rcParams["xtick.labelsize"] = plt.rcParams["font.size"]
    plt.rcParams["ytick.labelsize"] = plt.rcParams["font.size"]
    # plt.rcParams['savefig.dpi'] = 2*plt.rcParams['savefig.dpi']
    plt.rcParams["xtick.major.size"] = 3
    plt.rcParams["xtick.minor.size"] = 3
    plt.rcParams["xtick.major.width"] = 1
    plt.rcParams["xtick.minor.width"] = 1
    plt.rcParams["ytick.major.size"] = 3
    plt.rcParams["ytick.minor.size"] = 3
    plt.rcParams["ytick.major.width"] = 1
    plt.rcParams["ytick.minor.width"] = 1
    plt.rcParams["legend.frameon"] = False
    plt.rcParams["legend.loc"] = "center left"
    plt.rcParams["axes.linewidth"] = 0.5
    plt.rcParams["lines.linewidth"] = 1.25
    plt.rcParams["legend.numpoints"] = 1
    plt.rcParams["legend.scatterpoints"] = 1
    plt.rcParams["legend.handlelength"] = 1
    plt.rcParams["legend.borderpad"] = 0.3
    plt.rcParams["legend.borderaxespad"] = 0.3


def init_powerpoint():
    plt.rcParams["font.size"] = 10
    plt.rcParams["font.family"] = "Times"
    plt.rcParams["axes.labelsize"] = plt.rcParams["font.size"] * 1.5
    plt.rcParams["axes.titlesize"] = plt.rcParams["font.size"] * 1.5
    plt.rcParams["legend.fontsize"] = plt.rcParams["font.size"]
    plt.rcParams["xtick.labelsize"] = plt.rcParams["font.size"]
    plt.rcParams["ytick.labelsize"] = plt.rcParams["font.size"]
    # plt.rcParams['savefig.dpi'] = 2*plt.rcParams['savefig.dpi']
    plt.rcParams["xtick.major.size"] = 3
    plt.rcParams["xtick.minor.size"] = 3
    plt.rcParams["xtick.major.width"] = 1
    plt.rcParams["xtick.minor.width"] = 1
    plt.rcParams["ytick.major.size"] = 3
    plt.rcParams["ytick.minor.size"] = 3
    plt.rcParams["ytick.major.width"] = 1
    plt.rcParams["ytick.minor.width"] = 1
    plt.rcParams["legend.frameon"] = False
    plt.rcParams["legend.loc"] = "center left"
    plt.rcParams["axes.linewidth"] = 0.5
    plt.rcParams["lines.linewidth"] = 3
    plt.rcParams["legend.numpoints"] = 1
    plt.rcParams["legend.scatterpoints"] = 1
