plotoctaveaxes

How can I draw a cartesian reference system with X and Y axes centered, passing through the origin of the plot?


I would like to draw using Octave the axis passing both through the origin (0,0) of my plot like in the figure below: enter image description here

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)

Solution

  • Noob here, I stumbled upon the answer:

    Here's the documentation: https://docs.octave.org/v4.2.2/Axes-Properties.html