Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- %matplotlib inline
- import h5py
- import numpy as np
- file = h5py.File("C:\\Users\\Jan\\Documents\\Physik & Mathe\\Bachelorarbeit\\h5 Dateien zum Ausprobieren\\positions.h5")
- x_axis = file["/data/encoder_fast/data"]
- y_axis = file["/data/encoder_slow/data"]
- x = list(x_axis)
- y = list(y_axis)
- index = range(1,len(y)+1)
- x_1 = x[:5000]
- y_1 = y[:5000]
- x_2 = x[5000:10000]
- y_2 = y[5000:10000]
- x_3 = x[10000:15000]
- y_3 = y[10000:15000]
- x_4 = x[15000:20000]
- y_4 = y[15000:20000]
- x_5 = x[20000:25000]
- y_5 = y[20000:25000]
- x_6 = x[25000:30000]
- y_6 = y[25000:30000]
- x_7 = x[30000:35000]
- y_7 = y[30000:35000]
- x_8 = x[35000:40000]
- y_8 = y[35000:40000]
- x_9 = x[40000:42000]
- y_9 = y[40000:42000]
- fig = plt.figure(figsize=(10, 8))
- ax1 = plt.subplot2grid((3, 3), (0, 0))
- ax1.plot(x_1,y_1)
- ax2 = plt.subplot2grid((3, 3), (0, 1))
- ax2.plot(x_2,y_2)
- ax3 = plt.subplot2grid((3, 3), (0, 2))
- ax3.plot(x_3,y_3)
- ax4 = plt.subplot2grid((3, 3), (1, 0))
- ax4.plot(x_4,y_4)
- ax5 = plt.subplot2grid((3, 3), (1, 1))
- ax5.plot(x_5,y_5)
- ax6 = plt.subplot2grid((3, 3), (1, 2))
- ax6.plot(x_6,y_6)
- ax7 = plt.subplot2grid((3, 3), (2, 0))
- ax7.plot(x_7,y_7)
- ax8 = plt.subplot2grid((3, 3), (2, 1))
- ax8.plot(x_8,y_8)
- ax9 = plt.subplot2grid((3, 3), (2, 2))
- ax9.plot(x_9,y_9)
- plt.tight_layout()
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement