Guest User

Untitled

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