That's probably because you're not defining a figure to contain it.
Here is a modification of your code:
from matplotlib.pyplot import figure, plot, show, xlabel, ylabel
spike_id = [i[0] for i in v]
spike_time = [i[1] for i in v]
fig = figure(figsize=[16,9])
# Plot number 1:
fig.add_subplot(211)
plot(spike_time, spike_id, ".")
xlabel("Time(ms)")
ylabel("NeuronID")
# plot number 2:
fig.add_subplot(212)
plot(time,volts , "-")
xlabel("Time (ms)")
ylabel("Volts (mv)")
show()
You also asked if the size of the vector matters.
No. If it can be calculated in Python, it can be shown in MatPlotLib (which is mostly implemented in C). It just might take some time if there are a few million processes. Also, consider calculating your spike_id and spike_time as generators, or NumPy array, to avoid unnecessary iterations. Here is how:
Generators:
spike_id = (i[0] for i in v)
spike_time = (i[1] for i in v)
NumPy:
Use of NumPy allows for vectorisation, which would substantially optimise your programme and make it considerably faster; especially if you are handling large volumes of data.
It also sounds like you're handling some signalling data (maybe EEG or EMG?). Anyhow, NumPy will provide you with variety of extremely useful tools for dealing with, and analysing such data.
from numpy import array
v_array = array(v)
spike_id = v_array[:, 0]
spike_time = v_array[:, 1]
If you use an IPython / Jupyter notebook, you can embed the figure inside your notebook like so:
from matplotlib.pyplot import figure, plot, xlabel, ylabel
%matplotlib inline
and thereby you can skip show() as it will no longer be necessary.
Hope this helps.
rcParamsormatplotlibrcset up correctly for your installation? Have you been able to plot things before now? Please edit your question and add as many relevant details as possible.