File Exchange

image thumbnail

gclabel

version 1.0.0.0 (7.45 KB) by M MA
Guided contour labels

3 Downloads

Updated 15 Nov 2005

View License

GCLABEL allows the automatic placement of contour labels in the intersection points between a guide and the contour lines.

The guide is created by the user and can be a curve (spline) or a broken line. Any number of guides can be added and they also can be saved (as a text file) for future use in other figures

Usage:
[C,H] = CONTOUR(...)
GCLABEL(H)

1- Click with the left mouse buttom at least twice on the axes to create the guide and auxiliary points (aux). To stop click with other buttom.

2- Use the left mouse buttom to drag guide or aux as desired

3- Click on the guide with right buttom and select <done> on the uicontextmenu. This will delete the guide and aux

Many options are available, see the help of the file and see the screenshots for some features

It works in Matlab releases from 5.3 (at least) to the current one (R14)

Cite As

M MA (2021). gclabel (https://www.mathworks.com/matlabcentral/fileexchange/9028-gclabel), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)

better li

Very useful code,but it faces bugs in Matlab 2015. Some function isn't in matlab 2015.

Guzman

Works as advertised. Excellent replacement to clabel, providing control on the label location

Sam Bennett

Is it possible to use a circle as a guide, given a center point and radius? Thanks!

Carlos Adrian Vargas Aguilera

Hi, M-Ma, maybe, the guide can be made automatically by using the gradient.

Carlos

Carlos Adrián Vargas Aguilera

I'll give it a try. It looks great at first impression.

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

Inspired: scattertext

Community Treasure Hunt

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

Start Hunting!