Skip to content

Make plots

Plot voltage by integrating the model

Since the outputs from x.integrate are matrices when x.output_structure = 0, you can plot them as you would any other matrix of vector in MATLAB.

Example

x = xolotl.make_bursting_neuron;
V = x.integrate;
time = x.dt:x.dt:x.t_end;
plot(time,V,'k')
xlabel('Time (ms)')
ylabel('V_m (mV)')

makes this figure:

Making plots using the plot function

The plot function will generate a figure, simulate the model, and plot the voltage traces. Here are a few important features to note:

  • If a figure handle is set up in x.handles.fig it will use it. Otherwise, it will generate the plot and put the figure handle there.
  • Subplot handles are stores in x.handles.ax.
  • The plots are colored by the largest contributing current. You can turn this functionality off by setting x.pref.plot_color = false. To make this change permanent for all xolotl objects, edit the pref.m file in the xolotl directory.
  • The plots also show the calcium trace (if any). To turn this functionality off, set x.pref.show_Ca = false. To make this change permanent for all xolotl objects, edit the pref.m file in the xolotl directory.

What's a contributing current?

The voltage trace is colored by the dominant current at that time. When the voltage is increasing, the color corresponds to the largest positive (inward cation or outward anion) current. Inversely, when the voltage is decreasing, the color corresponds to the largest negative (outward cation or inward anion) current.

Example

x.plot

makes this figure:

Show activation curves of channels

The activation curves and timescale dependence on any channel can be plotted using the show method.

Example

xolotl.show('liu/NaV')
xolotl.show('prinz/NaV')

makes this figure:

Make a stem plot of maximal conductances in a compartment

xolotl comes with a built in method to plot the maximal conductances in a compartment. This can be useful for more complex visualizations that you could make yourself.

Example

close all
x = xolotl.make_bursting_neuron;
x.plotgbars('AB')

makes a plot like this:

See Also