Using images for axis tick labels

30 views
Skip to first unread message

Tom

unread,
Feb 23, 2016, 11:42:13 AM2/23/16
to ggplot2
A few years and several ggplot2 versions ago, user kohske contributed a nice solution to StackOverflow for implementing images as tick mark labels in ggplot2. Their solution, which used opts(), will no longer work, and I'm struggling to come up with an updated solution. I would appreciate any help with this.

The original answer and example graph can be found at http://stackoverflow.com/a/8922470/393354

In the above solution, the grImport library is used. In my case, I'd be much happier using readPNG() from the png library.

For reference, there is also a StackOverflow solution using grid, but it mucks about with the internal grob structure of the ggplot object and reverses the position of the ticks and the axis label. Not really ideal. http://stackoverflow.com/a/29978119/393354

Any ideas on how to do this in ggplot2 2.0?

Thanks,

Tom

Reply all
Reply to author
Forward
0 new messages