R Notes

zurück/back to home

Legend pch (point character) Printed in Bold

When exporting to PDF, you might hit an issue with the point character “o” (number 1) in the legend of your plots. In the plots for my diploma thesis, I call title to set the title of the axes and legend to display the legend. Strangely, the order matters.

When calling legend before title then the point character “o” gets printed very boldly:

legend("topright", labels, pch=pchs, col=cols)
title(xlab="k", ylab="time [s]")

Legend with bold o.

If the order is reversed, it works perfectly.

title(xlab="k", ylab="time [s]")
legend("topright", labels, pch=pchs, col=cols)

Legend with normal o.