#!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt T_cyc = 0.477 N_ts = 14280 cyc = 5 pressure_filename = "Z:\\Aloma\\Class\\final_BIEN6931\\Simulations\\MCS_m04\\96-procs_case\\PHistRCR.dat" #pressure_filename = "Z:\\Aloma\\Class\\final_BIEN6931\\Simulations\\sim03_RCR_2cyc\\PHistRCR_ok.dat" #pressure = np.loadtxt(pressure_filename) pressure = np.loadtxt(pressure_filename, skiprows=1,) time = np.linspace(0,T_cyc*cyc,pressure.shape[0]) # Ploting Pressure over iterations # use this to have the plot in different window %matplotlib qt n=2 plt.figure() plt.plot(time,pressure[:,n]/1333.22) plt.ylabel('Pressure [mmHg]') plt.xlabel('Time [s]') plt.title('Presure evolution ROI-2') axes = plt.gca() xmax = time[-1] xmin = time[0] axes.set_xlim([xmin,xmax]) ymin = min(pressure[:,n]/1333.22) ymax = max(pressure[:,n]/1333.22+1) axes.set_ylim([ymin,ymax]) plt.show() # Ploting Pressure in all the vessels same plot over time n = pressure.shape i=0 plt.figure() while (i