-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotIF.m
More file actions
70 lines (53 loc) · 1.65 KB
/
plotIF.m
File metadata and controls
70 lines (53 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
inputColor=[1 0 0];
inputBetaColor=[0 1 0];
stepsPlot=length(fullV);
xaxis=(1:stepsPlot)*dt;
xMin=0;
xMax=500;
ySeparation=280;
figNum=6;
h=figure(figNum);
clf
ax=gca;
ax.XLabel.String='Time (ms)';
ax.FontWeight='bold';
ax.FontSize=20;
hold on
plot(xaxis,fullV,'Color','blue','LineWidth',2,'LineStyle','-','Marker','None')
yMax=320;
inputHeight=70;
plot(xaxis,fullInput1*dt*inputHeight/input1strength+200,'lineWidth',2,'Color',inputColor,'LineStyle','-','Marker','None');
plot(xaxis,-fullInput2*inputHeight/abs(input2reset)+75,'lineWidth',2,'Color',inputBetaColor,'LineStyle','-','Marker','None');
color1='\color[rgb]{1.00,0.00,0.00}';
color2='\color[rgb]{0.00,1.00,0.00}';
color0='\color[rgb]{0.00,0.00,0.00}';
yyaxis right
yMin=-110;
ax.YTick=[-10 130 240];
ax.YTickLabel=[['\color{black}' 'cell '];['\color{green}' 'input-2'];['\color{red}' 'input-1 ']];
yyaxis left
if showUnits
y1=[-50 0 50];
y1Label=['\fontsize{12} -50'; '\fontsize{12} 0'; '\fontsize{12} 50'];
ax.YTick=y1;
ax.YTickLabel=y1Label;
ax.YLabel.String='\fontsize{18} Membrane\newline potential (mV)';
end
ax.XLim=[xMin xMax];
ax.YAxis(1).Limits=[yMin yMax];
ax.YAxis(2).Limits=[yMin yMax];
ax.YAxis(2).Color='black';
ax.YAxis(2).FontSize=20;
ax.XAxis.FontSize=20;
ax.YAxis(2).TickLength=[0 0];
h.PaperUnits = 'inches';
h.PaperPosition = [0 0 12 2.5];
set(h,'PaperSize',[h.PaperPosition(3), h.PaperPosition(4)]);
if nameSuffix
fullPath=strcat(folder,'/membraneV-',nameSuffix);
else
fullPath=strcat(folder,'/membraneV');
end
saveas(h,fullPath,'fig')
%saveas(h,fullPath,'png')
print(h,fullPath,'-dpdf','-r0')