this plot shows the voltage course lines of a simulated neuron:
i would like to place a zoom in plot in the upper right corner so that you can see the current fluctuations of the lines better (the scale here is such that you can hardly see them)
attached the code for the plot
factor to define voltage-amplitude heightsv_amp_factor = 1/(50) ##### distances between lines and x-axis offset = np.cumsum(distance_comps_middle)/meter offset = (offset/max(offset))*10 plt.close(plot_name) voltage_course = plt.figure(plot_name) for ii in comps_to_plot: plt.plot(time_vector/ms, offset[ii] - v_amp_factor*(voltage_matrix[ii, :]-V_res)/mV, "#000000") plt.yticks(np.linspace(0,10, int(length_neuron/mm)+1),range(0,int(length_neuron/mm)+1,1)) plt.xlabel('Time/ms', fontsize=16) plt.gca().invert_yaxis() # inverts y-axis => - v_amp_factor*(.... has to be written above ##### no grid plt.grid(False) plt.savefig('plot_name', dpi=600) plt.show(plot_name)
parameter description:
Parameters
----------
plot_name : string
This defines how the plot window will be named.
time_vector : list of time values
Vector contains the time points, that correspond to the voltage values
of the voltage matrix.
voltage_matrix : matrix of membrane potentials
Matrix has one row for each compartment and one columns for each time
step. Number of columns has to be the same as the length of the time vector
comps_to_plot : vector of integers
This vector includes the numbers of the compartments, which should be part of the plot.
distance_comps_middle : list of lengths
This list contains the distances of the compartments, which allows that
the lines in the plot are spaced according to the real compartment distances
length_neuron : length
Defines the total length of the neuron.
V_res : voltage
Defines the resting potential of the model.


