Hello,

I have several Barplots I want to plot. I also want to include a legend.
Since my Barplots are very different I ve dicided to put the legend in
the top left corner.

Unfortunately, sometimes there is a part of a bar just below the legend.

This makes it difficult to see the legend itself or the barplot.

All I found out so far, is to make the backgroundcolor of the legend
white or so, but I would couldn t see the bar anymore.

Is there a way, to position the legend "excel-like" on the outside the
plot on the side? or
Is there a possibility to use sort of an alpha-factor to make the
background white but slightly invisible so that there is a contrast?

I hope you can help me out and thank you in advance!

#Example:
barplot(VADeaths)
legend("topleft", c("1xxxxx", "2xxxxx", "3xxxxx", "4xxxxx", "5xxxxx"),
bg="white"))




Markus Schweitzer - http://www.pokertips.tk

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to