pyenv.py 1.56 KB
Newer Older
1 2 3 4 5 6 7
from __future__ import division, absolute_import, print_function
import sys
if sys.version_info < (3,):
    range = xrange
else:
    unicode = str

Tiago Peixoto's avatar
Tiago Peixoto committed
8
import os
9 10 11 12
from matplotlib import rc
from matplotlib import rcParams

font_size=14
13 14
rcParams["backend"] = "PDF"
rcParams["figure.figsize"] = (4, 3)
15
rcParams["font.family"] = "Serif"
Tiago Peixoto's avatar
Tiago Peixoto committed
16
rcParams["font.serif"] = ["Times"]
17 18 19 20 21 22 23 24 25 26 27 28 29 30
rcParams["font.size"] = font_size
rcParams["axes.labelsize"] = font_size
rcParams["xtick.labelsize"] = font_size - 2
rcParams["ytick.labelsize"] = font_size - 2
rcParams["legend.numpoints"] = 1
rcParams["legend.fontsize"] = "small"
rcParams["lines.markersize"] = 4
rcParams["figure.subplot.right"] = 0.95
rcParams["figure.subplot.top"] = 0.95
rcParams["figure.subplot.right"] = 0.95
rcParams["figure.subplot.top"] = 0.95
rcParams["figure.subplot.left"] = 0.2
rcParams["figure.subplot.bottom"] = 0.2

Tiago Peixoto's avatar
Tiago Peixoto committed
31
rcParams["image.cmap"] = "magma"
32

33 34 35 36 37 38
rcParams["text.usetex"] = True

rcParams["ps.usedistiller"] = "xpdf"
rcParams["pdf.compression"] = 9
rcParams["ps.useafm"] = True
rcParams["path.simplify"] = True
Tiago Peixoto's avatar
Tiago Peixoto committed
39 40
rcParams["text.latex.preamble"] = [r"\usepackage{times}",
                                   #r"\usepackage{euler}",
41 42
                                   r"\usepackage{amssymb}",
                                   r"\usepackage{amsmath}"]
43 44 45 46

import scipy
import scipy.stats
import numpy as np
47 48
from pylab import *
from numpy import *
49
import graph_tool.all as gt
50
import graph_tool.draw
51
import random as prandom
52 53 54

figure()

Tiago Peixoto's avatar
Tiago Peixoto committed
55 56 57 58
try:
    gt.openmp_set_num_threads(1)
except RuntimeError:
    pass
59 60

prandom.seed(42)
61 62
np.random.seed(42)
gt.seed_rng(42)