dual_axes
Version 1.1.0 (861 KB) by
Xavier Santacruz
Adds a unit converted second axis to either y, x, or both. The second converted axis is placed opposed or on the same side as the main one.
dual_axes
Adds a second axis with a linear conversion to other set of units to plot
Syntax:
dual_axes(Axis,Title,Type,Conversion,Name,...)
Description:
Adds a unit converted second axis to either y or x, or both. The second converted axis is placed opposed or on the same side as the main one. Axes are linked and can be panned and returned to home. *Opposed: the main x-axis is at the bottom and the added generated one by this funcion will be at the top of the plotting area; the second y-axis will be added to the right. *Same: the generated axis will be placed offset from the main one to the left (if y) or below (if x).
Notes:
- Title must be fed and called by the function. If no title is desired, feed a blank ([]) or empty string ('')
- All other modifiers need to be called BEFORE this function
Inputs:
- Axis: Axis handler where to insert dual_axes
- Title: Figure title. DO NOT CALL TITLE OUTSIDE OF THIS!
- Type: 'x','y', or 'xy' for opposed to main axes; 'xs','ys', or 'xys' for same side as main axes.
- Conversion: Conversion factor from unit on plot to the one you want
- Name: New unit label
- [conv2]: Y-axis conversion factor when 'xy' or 'xys' is selected
- [name2]: Y-axis label when 'xy' or 'xys' is selected
Outputs:
- [Axis]: [optional] Axis handler(s) of dual if needed to access properties
--------------------------------------------------------------------------------------
Author: XSantacruz (santacrx@gmail.com)
Revison: 3.3 - 20220331
--------------------------------------------------------------------------------------
Cite As
Xavier Santacruz (2026). dual_axes (https://github.com/santacrx/dual_axes/releases/tag/v1.1.0), GitHub. Retrieved .
MATLAB Release Compatibility
Created with
R2019a
Compatible with R2017b and later releases
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.1.0 |
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.
