Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Result of "echo df":
- Dataframe with 2 columns and 28 rows:
- Idx spikes neurons
- dtype: int int
- 0 0 0
- 1 502 0
- 2 502 0
- 3 502 0
- 4 502 0
- 5 502 0
- 6 502 0
- 7 502 0
- 8 502 0
- 9 502 0
- 10 502 0
- 11 502 0
- 12 502 0
- 13 502 0
- 14 502 0
- 15 502 0
- 16 502 0
- 17 502 0
- 18 502 0
- 19 502 0
- Code:
- ggplot(df, aes("spikes", "neurons")) +
- geom_linerange(aes(ymin = f{1.0},
- ymax = f{-1.0})) +
- scale_y_continuous() + # make sure y is considered cont.
- ylim(1, -1) + # at the moment ymin, ymax are not considered for the plot range (that's a bug)
- ggtitle("Spike raster plot") +
- ggsave("spike_raster.pdf")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement