The farthest yticklabels do not appear when using ax.YAxisLocation = ‘origin’
The two farthest ytickslabels (in this case both -1 and +1), do not show up if I use ax.YAxisLocation = ‘origin’
x=-1:0.1:1;
plot(x,x,’o-‘)
ax=gca;
ax.YAxisLocation = ‘origin’;
set(ax,’fontsize’,20)
yticks([-1 -0.5 0 0.5 1])
Is there a way to show them without playing with ylim([-2 2]) as here below?
x=-1:0.1:1;
plot(x,x,’o-‘)
ax=gca;
ax.YAxisLocation = ‘origin’;
set(ax,’fontsize’,20)
yticks([-1 -0.5 0 0.5 1])
ylim([-2 2])The two farthest ytickslabels (in this case both -1 and +1), do not show up if I use ax.YAxisLocation = ‘origin’
x=-1:0.1:1;
plot(x,x,’o-‘)
ax=gca;
ax.YAxisLocation = ‘origin’;
set(ax,’fontsize’,20)
yticks([-1 -0.5 0 0.5 1])
Is there a way to show them without playing with ylim([-2 2]) as here below?
x=-1:0.1:1;
plot(x,x,’o-‘)
ax=gca;
ax.YAxisLocation = ‘origin’;
set(ax,’fontsize’,20)
yticks([-1 -0.5 0 0.5 1])
ylim([-2 2]) The two farthest ytickslabels (in this case both -1 and +1), do not show up if I use ax.YAxisLocation = ‘origin’
x=-1:0.1:1;
plot(x,x,’o-‘)
ax=gca;
ax.YAxisLocation = ‘origin’;
set(ax,’fontsize’,20)
yticks([-1 -0.5 0 0.5 1])
Is there a way to show them without playing with ylim([-2 2]) as here below?
x=-1:0.1:1;
plot(x,x,’o-‘)
ax=gca;
ax.YAxisLocation = ‘origin’;
set(ax,’fontsize’,20)
yticks([-1 -0.5 0 0.5 1])
ylim([-2 2]) yaxislocation, origin, yticks, yticklabels MATLAB Answers — New Questions