calcTextPosInScatte​rPlot

Version 1.0.2 (23.7 KB) by Eiji Konaka
This function calculates label positions in scatter plot. The position is calculated so as to avoid other data and labels.
29 Downloads
Updated 5 Nov 2020

View License

function [txPos]=calcTextPosInScatterPlot(dtPos)

Input: dtPos (n x 2 matrix with (double) value.)
This matrix shows the data plotted as a scatter plot.

Output: txPos (n x 2 matrix with (double) value.)
This matrix shows the label position associated with dtPos.

usage_calcTextPosInScatterPlot.m
This file is an example of usage of calcTextPosInScatterPlot.
1. Prepare dtPos.
2. Call [txPos]=calcTextPosInScatterPlot(dtPos)
3. Place texts on txPos and markers on dtPos. In this example, associated text and data point are connected with dashed lines.

Cite As

Eiji Konaka (2024). calcTextPosInScatterPlot (https://www.mathworks.com/matlabcentral/fileexchange/82280-calctextposinscatterplot), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.2

Minor fix.

1.0.1

Fix file upload problem

1.0.0