Created
January 23, 2019 21:26
-
-
Save andrewm4894/62174bbf299ecb36cada254314290644 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make some random data | |
data_rand = np.random.rand(N_DATA,N_FEATURES) | |
data_new = np.copy(data) | |
# at a random point for a certain number of steps, swap out the smooth data with some random data | |
data_new[random_break_point:(random_break_point+BREAK_LEN)] = data_rand[random_break_point:(random_break_point+BREAK_LEN)] | |
# plot the new data | |
fig, ax = plt.subplots(num=None, figsize=(14, 6), dpi=80, facecolor='w', edgecolor='k') | |
size = len(data_new) | |
for x in range(data_new.shape[1]): | |
ax.plot(range(0,size), data_new[:,x], '-', linewidth=0.5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment