Code covered by the BSD License  

Highlights from
changeloglabels v3

Be the first to rate this file! 2 Downloads (last 30 days) File Size: 1.88 KB File ID: #25384

changeloglabels v3

by Jeffrey

 

22 Sep 2009 (Updated 22 Sep 2009)

Alters log labels to linear (10^1.45 to 28..). Remakes for zoom/pan. Automatically runs.

| Watch this File

File Information
Description

The function will change all the axes that have log labels (10^XX) to linear labels while still maintaining the log spacing. It will remake the labels when the zoom in/out and pan functions are used.

This is particularly useful for frequency plots.

Update: This function no longer needs to be actively called. Place the following commands in you startup file:

set(0,'DefaultFigureCreateFcn','set(zoom,''ActionPostCallback'',''changeloglabels'');set(pan,''ActionPostCallback'',''changeloglabels'')')
set(0,'DefaultAxesCreateFcn','proplistener(gca,{''XScale'',''YScale''},''PostSet'',''changeloglabels'')')

Whenever a plot is made with log axes, this code will automatically run.

Note: This usage requires that you have proplistener.m, I.D. 18301

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
PropListener - add a callback to property value get/set event

MATLAB release MATLAB 7.3 (R2006b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
22 Sep 2009

Reset labels to auto for when switching back to linear units.

Tag Activity for this File
Tag Applied By Date/Time
frequency Jeffrey 22 Sep 2009 14:43:27
log Jeffrey 22 Sep 2009 14:43:28
log labels Jeffrey 22 Sep 2009 14:43:28
axis Jeffrey 22 Sep 2009 14:43:28
axes Jeffrey 22 Sep 2009 14:43:28
plot Jeffrey 22 Sep 2009 14:43:28

Contact us at files@mathworks.com