|
|
| File Information |
| Description |
This function adds a second dummy x-axis on the top of a given axes object. This dummy x-axis has (internally) the same scaling (linear or log) than the main x-axis, but is used to display ticks and tick labels which are on a transformed scale.
The transformation is arbitrary, but the transformed axis cannot be used to create plots with transformed x coordinates. The given transformation is in fact the inverse transform, that is, the transform used to go from the secondary axis to the original axis (e.g. displaying a log scale would be done by providing a transform '10.^x').
The transformed axis can be removed cleanly by issuing a simple command.
Typical uses of addtxaxis would include displaying a secondary x-axis following reciprocal or logarithmic scales (e.g. frequency and wavelength on the same plot). |
| Acknowledgements |
This submission has inspired the following:
Add top X-axis with different scale
|
| MATLAB release |
MATLAB 6.5 (R13)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (16) |
| 21 Oct 2003 |
Jakob van Bethlehem
|
|
|
| 21 Oct 2003 |
Jakob van Bethlehem
|
|
|
| 22 Oct 2003 |
François Bouffard
|
|
|
| 10 Jun 2004 |
François Bouffard
|
|
|
| 11 Jun 2004 |
kris zacny
|
|
|
| 11 Nov 2004 |
John Lipp
|
|
|
| 20 Apr 2005 |
Markus Loecher
|
|
|
| 25 Apr 2006 |
Carlos Baiz
|
|
|
| 22 Mar 2007 |
Tom Allison
|
|
|
| 21 Aug 2007 |
Saeed Tahvili
|
|
|
| 13 Sep 2007 |
Amol Singh
|
|
|
| 15 Nov 2007 |
Hai Dinh
|
|
|
| 15 Nov 2007 |
François Bouffard
|
|
|
| 11 May 2008 |
AHMET ANIL DINDAR
|
|
|
| 10 Oct 2008 |
Natalia Gomez
|
|
|
| 04 Aug 2011 |
Stephen
|
|
|
| Updates |
| 23 Oct 2003 |
Fix of bug found by Jakob van Bethlehem (whom I whish to thank): the transform is now evaluated in the base workspace, so that variables defined there can be used in the expression of the transformation. |
| 10 Jun 2004 |
It seems the last fix was incorrectly transmitted. This is a retry. |
| 11 Oct 2004 |
Fixes suggested by Lars Kappei: Box propery is now "Off" and correct units are used in transformed axis. |
|
Contact us at files@mathworks.com