blob: 7442e37480649d77b508cbe6d7f458b9980e4663 (
plain)
ofs | hex dump | ascii |
---|
0000 | 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 04 00 00 00 03 00 08 02 00 00 00 35 d8 82 | .PNG........IHDR.............5.. |
0020 | 5a 00 00 20 00 49 44 41 54 78 9c ec bd 77 7c 54 55 fe ff ff 0c 10 33 01 42 08 9d 20 35 f4 04 48 | Z....IDATx...w|TU.....3.B...5..H |
0040 | 08 bd 0b 88 2e 16 74 15 51 54 16 d0 5d 50 50 04 94 22 d2 55 c0 95 26 55 91 05 14 0b 20 4d 11 01 | ......t.QT..]PP..".U..&U.....M.. |
0060 | 45 7a af a1 05 08 bd 08 21 94 40 48 32 c9 4c 98 ef 1f 27 f7 e6 4e bb f7 dc c9 04 f0 f3 fb bd 1e | Ez......!.@H2.L...'..N.......... |
0080 | 79 ec 8e 77 ce fb 9c 33 c3 cc 9d d7 eb bc 5b 40 7a 7a 3a 0a 02 02 02 30 03 b3 e3 1f 06 78 db f3 | y..w...3......[@zz:....0.....x.. |
00a0 | ad 5b b7 dc 2f 3a 1c 8e dc ac e5 62 6e b7 db 65 86 99 9a 53 7f e4 ed db b7 e5 cd 0f 1d 3a a4 f3 | .[../:.....bn..e...S.........:.. |
00c0 | ac 78 ea e2 c5 8b 86 b3 b9 5f bc 70 e1 82 cc 30 e0 f8 f1 e3 e2 #!/usr/bin/env python
# Copyright (c) 2019, Anthony Latorre <tlatorre at uchicago>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.
from __future__ import print_function, division
import numpy as np
# on retina screens, the default plots are way too small
# by using Qt5 and setting QT_AUTO_SCREEN_SCALE_FACTOR=1
# Qt5 will scale everything using the dpi in ~/.Xresources
import matplotlib
matplotlib.use("Qt5Agg")
if __name__ == '__main__':
import argparse
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
parser = argparse.ArgumentParser("plot likelihood function")
parser.add_argument("filenames", nargs='+', help="input files")
args = parser.parse_args()
for filename in args.filenames:
print(filename)
data = np.genfromtxt(filename)
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
X = data[:,0].reshape((50,50))
Y = data[:,1].reshape((50,50))
Z = data[:,2].reshape((50,50))
ax.plot_wireframe(X, Y, Z)
plt.show()
|