Page MenuHomec4science

post_plot.py
No OneTemporary

File Metadata

Created
Fri, Jan 3, 20:29

post_plot.py

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 27 20:30:55 2022
@author: kubilay
"""
import numpy as np
import matplotlib.pyplot as plt
import csv
file = open('Figures/articel_Dataset.csv')
csvreader = csv.reader(file)
rows = []
columns = []
for row in csvreader:
rows.append(float(row[0]))
columns.append(float(row[1]))
file.close()
T_start_fem = np.loadtxt('Figures/fem_start.txt')
T_middle_fem = np.loadtxt('Figures/fem_middle.txt')
T_end_fem = np.loadtxt('Figures/fem_end.txt')
time_fem = np.loadtxt('Figures/fem_time.txt')
T_start_superposition = np.loadtxt('Figures/superposition_start.txt')
T_middle_superposition = np.loadtxt('Figures/superposition_middle.txt')
T_end_superposition = np.loadtxt('Figures/superposition_end.txt')
time_superposition = np.loadtxt('Figures/superposition_time.txt')
plt.figure()
plt.plot(time_fem, T_start_fem, label="fem_start")
plt.plot(time_fem, T_middle_fem, label="fem_middle")
plt.plot(time_fem, T_end_fem, label="fem_end")
plt.plot(time_superposition, T_start_superposition, label="superposition_start")
plt.plot(time_superposition, T_middle_superposition, label="superposition_middle")
plt.plot(time_superposition, T_end_superposition, label="superposition_end")
plt.legend(loc='best')
plt.savefig("Figures/comparison.png")
plt.figure()
plt.plot(time_superposition, T_start_fem - T_start_superposition, label="superposition_start")
plt.plot(time_superposition, T_middle_fem - T_middle_superposition, label="superposition_middle")
plt.plot(time_superposition, T_end_fem - T_end_superposition, label="superposition_end")
plt.legend(loc='best')
plt.savefig("Figures/difference.png")
plt.figure()
plt.plot(rows, columns, label="moran et.al.")
plt.plot(time_fem, T_start_fem, label="fem_start")
plt.plot(time_superposition, T_start_superposition, label="superposition_end")
plt.legend()
plt.savefig("Figures/start.png")
"""
T_start_analytic = np.loadtxt('Figures/analytic_start.txt')
T_middle_analytic = np.loadtxt('Figures/analytic_middle.txt')
T_end_analytic = np.loadtxt('Figures/analytic_end.txt')
time_analytic = np.loadtxt('Figures/analytic_time.txt')
T_start_flux = np.loadtxt('Figures/flux_start.txt')
T_middle_flux = np.loadtxt('Figures/flux_middle.txt')
T_end_flux = np.loadtxt('Figures/flux_end.txt')
time_flux = np.loadtxt('Figures/flux_time.txt')
plt.plot(time_analytic, T_start_analytic, label="analytic_start")
plt.plot(time_analytic, T_middle_analytic, label="analytic_middle")
plt.plot(time_analytic, T_end_analytic, label="analytic_end")
plt.plot(time_flux, T_start_flux, label="flux_start")
plt.plot(time_flux, T_middle_flux, label="flux_middle")
plt.plot(time_flux, T_end_flux, label="flux_end")
"""

Event Timeline