oaxes - central axis lines through an origin

Draw central axis lines through an origin point.
Updated 7 Aug 2012

View License

Oaxes creates a set of axis lines through a specified origin point. Oaxes supports both 2D and 3D views, ticks and tick labels, axis labels, log-scaled axes, and has a plethora of properties, analogous to normal axes properties, that give control over the oaxes object's appearance. In addition, various oaxes-specific properties give the user control over features such as arrows at the axis ends and the extent of the axis lines.

By default, the origin is set at the center of the axes limits, and will remain centered if the parent axes limits change. If a fixed origin point is specified, the axis lines will be drawn using that point as the origin. Additionally, the oaxes object will automatically update in response to changes to many of the parent axes' properties.

See the help text in oaxes.m for more information, including examples.

Oaxes uses a number of undocumented MATLAB features which may cause problems in older versions of MATLAB. If there are workarounds that do not require significant changes, I will add them to the code. MATLAB version 7.10.0 (R2010a) was used to develop and test Oaxes.

Installation: Unpack the contents of the .zip file, then add the top-level folder ("customplots") to the MATLAB path.

Cite As

John Barber (2024). oaxes - central axis lines through an origin (https://www.mathworks.com/matlabcentral/fileexchange/30018-oaxes-central-axis-lines-through-an-origin), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: axescenter

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

- Fixed bug when parent axes and figure have different background colors
- Fixed error when deleting an oaxes with 'HideParentAxesMode' set to 'color'
- Fixed tick label text properties bugs

- Bug fixes
- Improved redraw speed
- Improved appearance of minor ticks

- Minor bug fix

- Several minor bug fixes
- Removed unneeded code from constructor method

- Full object-oriented version
- 'Extend' limits mode, internal tick calculation, other new features
- Improved graphics refresh speed

- Properties can be accessed using set/get
- Oaxes responds automatically to property changes
- See the release notes for more details

Several bug fixes, improved text alignment, added new properties, improved help text. See the release notes in the help text for a full description.