# -*- coding: utf-8 -*- """Graficar_errores.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1QLjBgOPYP0oJ3qTPfRQ60VcX005faUrg """ import numpy as np import matplotlib.pyplot as plt #%% # Cargo los datos con np.genfromtxt Datos= np.genfromtxt('nombre_del_archivo.txt', skiprows=1) #%% # Separo los datos en las variables que tengo: períodos y longitudes # l=longitud; T=periodo; N=cantidad de periodos l = Datos[:,0] T = Datos[:,1] N = 14 ΔT = 0.06/np.square(200) # error del período -> yerr Δl = 0.1 # error de la longitud -> xerr #%% # Grafico plt.figure(figsize=(8,6)) plt.errorbar(l, T, yerr=ΔT, xerr=Δl, marker='o', ms = 2, ls = 'none') plt.xlabel('Longitud [m]') plt.ylabel('Período [s]') plt.grid() plt.show() #%%