def plot(use_pylustrator): # use the pylustrator only if it is asked for if use_pylustrator: # import pylustrator import pylustrator # activate pylustrator pylustrator.start() fig = plt.figure(figsize=(8, 6)) rmsd_ax = fig.add_subplot(211, facecolor='#FFFFCC') # fixme - load from the file saved data = np.loadtxt(os.path.splitext(__file__)[0] + '.dat').T time = data[1] / 1000 # to ns rmsd = data[2] rmsd_ax.plot(time, rmsd, 'o--', label="all") rmsd_ax.set_xlabel("time (ps)") rmsd_ax.set_ylabel(r"RMSD ($\AA$)") rmsd_ax.legend(loc="best").set_draggable(True) rmsd_hist_ax = fig.add_subplot(212) rmsd_hist_ax.hist(rmsd) plt.show() return time, rmsd, rmsd_ax, rmsd_hist_ax, fig
from matplotlib.backends.backend_pdf import PdfPages from scripts.helper_functions import getInputFile, getConfig, getData from scripts.helper_functions import refetchTimestamps, getVelocity, filterCells, correctCenter, getStressStrain, fitStiffness from scripts.helper_functions import initPlotSettings, plotVelocityProfile, plotStressStrain, plotMessurementStatus from scripts.helper_functions import storeEvaluationResults, load_all_data, get_bootstrap_fit import numpy as np import tqdm import pandas as pd import matplotlib.pyplot as plt from scipy.optimize import curve_fit from scipy.stats import gaussian_kde import glob import pylustrator pylustrator.start() files = [ [ r"\\131.188.117.96\biophysDS\emirzahossein\microfluidic cell rhemeter data\microscope_1\august_2020\2020_08_21_alginate2%_NIH_xposition_1\inlet\inlet_1\*_result.txt", ], [ r"\\131.188.117.96\biophysDS\emirzahossein\microfluidic cell rhemeter data\microscope_1\august_2020\2020_08_21_alginate2%_NIH_xposition_1\inlet\inlet_2\*_result.txt", ], [ r"\\131.188.117.96\biophysDS\emirzahossein\microfluidic cell rhemeter data\microscope_1\august_2020\2020_08_21_alginate2%_NIH_xposition_1\inlet\inlet_3\*_result.txt", ], ] pos = "inlet" axes = []