pyenv.py 1.54 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
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
rcParams["font.family"] = "Serif"
rcParams["font.serif"] = ["Palatino"]
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

31
32
rcParams["image.cmap"] = "hot"

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

rcParams["ps.usedistiller"] = "xpdf"
rcParams["pdf.compression"] = 9
rcParams["ps.useafm"] = True
rcParams["path.simplify"] = True
rcParams["text.latex.preamble"] = [#"\usepackage{times}",
                                   #"\usepackage{euler}",
Tiago Peixoto's avatar
Tiago Peixoto committed
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 random as prandom
51
52
53

figure()

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

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