3.75

3.8 | 4 ratings Rate this file 13 Downloads (last 30 days) File Size: 5.36 KB File ID: #8269

Transform Axes units to Normalized Units for Annotation Objects

by girish ratanpal

 

10 Aug 2005 (Updated 09 Jan 2006)

Transforms axes units to normalized units for annotation objects.

| Watch this File

File Information
Description

The annotation() function in MATLAB requires the X and Y coordinates for the object in normalized units. However, to accurately place objects, (without using GUI) we would like to give the annotation function the coordinates in terms of the current axes. This function transforms the axes coordinates that you enter, into normalized units that can be conveniently used in the annotation function.

MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
22 Jan 2006 Tim Toolan  
10 Feb 2006 David Mays

The arrows look good on the screen, but their location is slightly wrong when I send the image to my HP LaserJet 1320 printer, to a TIFF file, or to an EPS file. I am using Matlab 7.1 Student Version on Windows XP Professional. This is unfortunate, because this function is very good except for this defect. I would fix it myself, if I could program as well as the author.

31 Oct 2006 Jan van Hulzen

Very nice saves me some time!

12 Jan 2007 Mark Harrington

Noticed strange results when the figure window is docked in 2006b. The annotations are no longer aligned with the data points, using a semilogx axes.

Please login to add a comment or rating.
Updates
15 Aug 2005

The function now works for both log an linear scales and also for reversed axes.

15 Aug 2005

This update removes the limitations of the previous version in regards to a log scale and a reversed scale. Now it is possible to pass this information as arguments to the transform. read the .m file for detailed description.

09 Jan 2006

now the function automatically checks for reverse/normal and log/linear status of the axes. all you need to do is enter the axes coordinates of where you want to place an annotation object.

Tag Activity for this File
Tag Applied By Date/Time
annotation girish ratanpal 22 Oct 2008 07:55:45
customization girish ratanpal 22 Oct 2008 07:55:45
normalized uints girish ratanpal 22 Oct 2008 07:55:45
annotation objects girish ratanpal 22 Oct 2008 07:55:45
graphics girish ratanpal 22 Oct 2008 07:55:45
plot girish ratanpal 22 Oct 2008 07:55:45

Contact us at files@mathworks.com