Friday, June 24, 2011

Matlab axis at origin

Matlab cannot plot axis at origins apparently. There are 2 contributions at FEX, axescenter and centeraxes to consider. The first has the issue that its not possible to delete properly (without clearing the figure) the second is basically not working as documented.

Best workaround i found is plotting them manually (without ticks though)

plot(-pSTDP.delta:-1, postpre(end:-1:1),'-');
hold on
plot(1:pSTDP.delta, prepost,'-');
plot([-pSTDP.delta pSTDP.delta],[0 0], 'k:');
plot([0 0],[pSTDP.Aplus pSTDP.Aminus],'k:');
hold off
ylabel('synaptic change')
xlabel('dt')

No comments:

Post a Comment