How do I change position of titles and subtitles of subplots?
I attached a screenshot of my plot.
I would like to put on the left (instead of above) the titles (Currents at -70mv, -50, -30 and -10) of the four subplots on the left; on the other hand, I would like to put on the right (instead of above) the titles (Currents at -60mv, -40, -20 and 0) of the four subplots on the right. This is to save space and delete some of the blank space between the subplots.
As for the subtitle ("I is 2 times slower than E"), I’d like to have only one instead of eight, possibly above all the subplots in the centre.
This is how I’m doing now (there’s another for loop "for rat = 1:colnum2" outside here but it’s not relevant for this question):
for vol = 1:colnum
subplot(4,2,vol);
plot(t_plot, currents(:,hh:zz), ‘linewidth’,2); legend(‘IPSC’, ‘EPSC’, ‘CPSC’);
str = sprintf(‘Currents at %d mV ‘, Vm(1,vol));
title(str)
subtitle([‘I is ‘, num2str(ratio(rat)), ‘ times slower than E’])
xlabel(‘Time(msec)’, ‘fontsize’, 7)
ylabel(‘Microamperes (uA)’, ‘fontsize’, 7);
hh = hh + niter;
zz = zz + niter;
end
Thanks!I attached a screenshot of my plot.
I would like to put on the left (instead of above) the titles (Currents at -70mv, -50, -30 and -10) of the four subplots on the left; on the other hand, I would like to put on the right (instead of above) the titles (Currents at -60mv, -40, -20 and 0) of the four subplots on the right. This is to save space and delete some of the blank space between the subplots.
As for the subtitle ("I is 2 times slower than E"), I’d like to have only one instead of eight, possibly above all the subplots in the centre.
This is how I’m doing now (there’s another for loop "for rat = 1:colnum2" outside here but it’s not relevant for this question):
for vol = 1:colnum
subplot(4,2,vol);
plot(t_plot, currents(:,hh:zz), ‘linewidth’,2); legend(‘IPSC’, ‘EPSC’, ‘CPSC’);
str = sprintf(‘Currents at %d mV ‘, Vm(1,vol));
title(str)
subtitle([‘I is ‘, num2str(ratio(rat)), ‘ times slower than E’])
xlabel(‘Time(msec)’, ‘fontsize’, 7)
ylabel(‘Microamperes (uA)’, ‘fontsize’, 7);
hh = hh + niter;
zz = zz + niter;
end
Thanks! I attached a screenshot of my plot.
I would like to put on the left (instead of above) the titles (Currents at -70mv, -50, -30 and -10) of the four subplots on the left; on the other hand, I would like to put on the right (instead of above) the titles (Currents at -60mv, -40, -20 and 0) of the four subplots on the right. This is to save space and delete some of the blank space between the subplots.
As for the subtitle ("I is 2 times slower than E"), I’d like to have only one instead of eight, possibly above all the subplots in the centre.
This is how I’m doing now (there’s another for loop "for rat = 1:colnum2" outside here but it’s not relevant for this question):
for vol = 1:colnum
subplot(4,2,vol);
plot(t_plot, currents(:,hh:zz), ‘linewidth’,2); legend(‘IPSC’, ‘EPSC’, ‘CPSC’);
str = sprintf(‘Currents at %d mV ‘, Vm(1,vol));
title(str)
subtitle([‘I is ‘, num2str(ratio(rat)), ‘ times slower than E’])
xlabel(‘Time(msec)’, ‘fontsize’, 7)
ylabel(‘Microamperes (uA)’, ‘fontsize’, 7);
hh = hh + niter;
zz = zz + niter;
end
Thanks! plot, subplot, plotting, matlab, title, subtitle MATLAB Answers — New Questions