Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % When plotting a function in octave, I might want to plot axes so they meet
- % at the coordinate origin, instead as boxes aroung the function graph.
- % This might only make sense if the origin of the coordinate system is even
- % contained within the plotted area.
- x=linspace(-4,1);
- plot(x,2*x+4,'r.',x,sqrt(2*x+4),'b.');
- set(gca,'xaxislocation','origin'); % push x axis to the origin of the coordinate system
- set(gca,'yaxislocation','origin'); % push y axis to the origin of the coordinate system
- set(gca,'box','off'); % turn off the coordinate box around the graph.
Add Comment
Please, Sign In to add comment