Last active
September 16, 2016 17:32
-
-
Save rocapp/3e0d2512fc31faf74f661c893833bf71 to your computer and use it in GitHub Desktop.
imshow for labeling raster plots
This file contains 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
colors = np.array(colors) # color array (N, 3) | |
repimg = np.broadcast_to(colors, (nr_neurons, len(colors), 3)) # broadcast the array to split into time axes | |
for r in range(0, nr_neurons): # iterate through each time axis | |
bot, top = 0.5+r, 1.5-vspace+r # set the locations of the bottom and top of each imshow extent | |
ax.imshow(repimg[:, :, :], extent=(0., tspace[-1], bot, top), alpha=0.85, aspect='auto') # call imshow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment