On 08/15/2013 01:16 AM, Igor Ribeiro wrote:
Dear all,
I need to insert an small icon in each bar of a barplot, in a specific
location (depending on bar's value).
For example: the first bar has X value of 5. I need to insert an icon at X
value 3. The second bar has X value of 8. I need to insert an icon at value
7.
I have both vectors with values for the bars and values where I should
include the icon.

Hi Igor,
You can probably display your "icons" with the rasterImage function in the base graphics package. In order to position the images, you will need the return value from barplot:

barpos<-barplot(...)

giving you the x positions, and your "values where I should include the icon" for the y positions. You will have to specify the position of the images in "bottom left/top right" coordinates, so this will depend upon the size of the image.

Jim

______________________________________________
R-help@r-project.org 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