Plot legend subscript


i made an histogramm and added some ablines, now i want to add a legend for the whole plot.

This is my code for the legend:

legend("topright", legend = c("TIM", "PIM", "RIM[1]"), col = c("green", "yellow", "blue"), lty = 1, lwd = 2.5)

The 1 behind RIM should be subscript.

For most of you this is just a small thing but its part of my task and i didn't find a solution with google.

Hopefully you can help me.

Thank you very much :slight_smile:

legend("topright", legend = c("TIM", "PIM", expression('RIM'[1])), col = c("green", "yellow", "blue"), lty = 1, lwd = 2.5)

Thanks again :slight_smile:

In my tasks there's also a question which says that i should use "Symbol type = 10" for every item of the legend.

Do you know what this should mean?

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.