I would like to draw using Octave the axis passing both through the origin (0,0) of my plot like in the figure below:
In matlab there is axescenter that do exactly what I want. My brother told me to use this:
line(xlim,[0 0], 'linestyle', '--')
And something similar for y axis.
But I wonder if there is something better that gives me exactly the result shown in the image I've posted.
This is the sample curve:
ezplot(@(x,y) x.^2 -x.*8 -y.+ 15)
Noob here, I stumbled upon the answer:
set (gca, "xaxislocation", "origin");
set (gca, "yaxislocation", "origin");
box off
(if you want to)Here's the documentation: https://docs.octave.org/v4.2.2/Axes-Properties.html