Hello Everybody, I have an eps figure an awesome bacteria and a plot (generated using R) also in eps format. Now it looks like there is space for only one figure and I have to insert the picture of the bacteria into the plot. Is there a way to insert figures (eps/png/jpg) in to plots (may be control over placement of figures in the plot as well?) ? By plots I mean data represented using axes and points and such and by figures I mean cartoons, pictures taken by a camera and such. Thanks, MoonStone -- View this message in context: http://n4.nabble.com/Insert-eps-files-in-to-an-R-plot-tp1690704p1690704.html Sent from the R help mailing list archive at Nabble.com.
mnstn wrote:> > Hello Everybody, > I have an eps figure an awesome bacteria and a plot (generated using R) > also in eps format. Now it looks like there is space for only one figure > and I have to insert the picture of the bacteria into the plot. Is there a > way to insert figures (eps/png/jpg) in to plots (may be control over > placement of figures in the plot as well?) ? By plots I mean data > represented using axes and points and such and by figures I mean cartoons, > pictures taken by a camera and such. > Thanks, > MoonStone >The grImport package on CRAN offers this functionality. Although I would caution that if you do this- consider carefully if adding the picture of bacteria enhances or distracts from the results or analysis you are presenting in the plot. If the picture is not strongly related to the data you are presentin, and I mean more related than just being a picture of the critter you analyzed, it may be better to just leave it out. Including it could lower the signal-to-noise ratio of the graph and decrease the impact of the analysis. I know it's a tough choice to omit a really good graphic when you have a space constraint, but it is usually not worth sacrificing the clarity of other graphics by smashing two things together if they are only marginally related. Good luck! -Charlie ----- Charlie Sharpsteen Undergraduate-- Environmental Resources Engineering Humboldt State University -- View this message in context: http://n4.nabble.com/Insert-eps-files-in-to-an-R-plot-tp1690704p1690852.html Sent from the R help mailing list archive at Nabble.com.
The subplot function in the TeachingDemos package will create a new plot inside of the existing one, so if you can plot your one image, the subplot function will help (using base graphics). The EBImage package may help with the reading and plotting of the figure. (there is also grImport, but it looks like it is fully grid based which is harder to work with base plots, on the other hand if your plot is grid based, then it will work better than subplot). Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of mnstn > Sent: Thursday, March 25, 2010 8:16 AM > To: r-help at r-project.org > Subject: [R] Insert .eps files in to an R plot. > > > Hello Everybody, > I have an eps figure an awesome bacteria and a plot (generated using R) > also > in eps format. Now it looks like there is space for only one figure and > I > have to insert the picture of the bacteria into the plot. Is there a > way to > insert figures (eps/png/jpg) in to plots (may be control over placement > of > figures in the plot as well?) ? By plots I mean data represented using > axes > and points and such and by figures I mean cartoons, pictures taken by a > camera and such. > Thanks, > MoonStone > -- > View this message in context: http://n4.nabble.com/Insert-eps-files-in- > to-an-R-plot-tp1690704p1690704.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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.