[R] Insert .eps files in to an R plot.

2010-03-25 Thread mnstn

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@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.


Re: [R] Insert .eps files in to an R plot.

2010-03-25 Thread Sharpie


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.

__
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.


Re: [R] Insert .eps files in to an R plot.

2010-03-25 Thread Greg Snow
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.s...@imail.org
801.408.8111


 -Original Message-
 From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
 project.org] On Behalf Of mnstn
 Sent: Thursday, March 25, 2010 8:16 AM
 To: r-help@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@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.

__
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.


Re: [R] Insert .eps files in to an R plot.

2010-03-25 Thread Paul Murrell

Hi

Greg Snow wrote:

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


Just to clarify, only the *drawing* parts of the package are grid-based; 
the *import* parts of the package are more neutral and it is possible to 
draw the resulting imported image using base graphics (it's just 
hard/painful to write a *general* drawing function for the imported 
image using base graphics).


Paul


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,



--
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
p...@stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/

__
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.