Bug 7084 - text(x, y, labels) - recycling problems #78
Labels
Assigned
Issue has been assigned to 1 or more contributors
Graphics
Issues related to graphics
needs patch
Implement the agreed fix and prepare a patch for review
R
Issue should require knowledge of R only
Currently
text()
recycles coordinate pairs when there are more labels than points to plot them at. For example:results in
![text_recycling](https://private-user-images.githubusercontent.com/3343008/384412171-20aa6397-0f57-4716-af5f-ef21ecba9a2c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwODk5NzIsIm5iZiI6MTczOTA4OTY3MiwicGF0aCI6Ii8zMzQzMDA4LzM4NDQxMjE3MS0yMGFhNjM5Ny0wZjU3LTQ3MTYtYWY1Zi1lZjIxZWNiYTlhMmMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMDgyNzUyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MmExNjUwMzgyNTY1OWJmODRiOGVkNDYwNGRkNzI1ZGE2YjUzNGY4MjVhNzIyMmYxMjRhOTRjYWYxNGNlMzAyYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.XqD3NDUR6hho-wNH6AOSr_nHJrnySwZkxCglOILn9NY)
where "D" is plotted on top of "A" because four labels have been provided (A, B, C, D) but only 3 points ((1, 2), (2, 3), and (1, 4) - the x coordinates are recycled to match the length of y).
This task is to modify
text()
to drop extra labels with a warning as proposed at the end of Bug 7084.The text was updated successfully, but these errors were encountered: