Background:
OS: Linux Mandrake 10.1
release: R 2.0.0
editor: GNU Emacs 21.3.2
front-end: ESS 5.2.3
---------------------------------
Colleagues
Is there a function in R that is an equivalent of zoom in matlab? This is
very useful for being able to magnify details in a plot.
I have searched the help for "zoom", "interactive zooming",
and "magnify".
The R search engine (reached from help.start() ) keywords by topic entry
for dynamic graphics seems to have no content, unless I made a mistake.
Here is the matlab function description:
-------------------------------
zoom
Zoom in and out on a 2-D plot
Syntax
zoom on
zoom off
zoom out
zoom reset
zoom
zoom xon
zoom yon
zoom(factor)
zoom(fig, option)
Description
zoom on turns on interactive zooming. When interactive zooming is enabled in
a figure, pressing a mouse button while your cursor is within an axes zooms
into the point or out from the point beneath the mouse. Zooming changes the
axes limits.
* For a single-button mouse, zoom in by pressing the mouse button and
zoom out by simultaneously pressing Shift and the mouse button.
*
* For a two- or three-button mouse, zoom in by pressing the left mouse
button and zoom out by pressing the right mouse button.
Clicking and dragging over an axes when interactive zooming is enabled draws
a rubber-band box. When the mouse button is released, the axes zoom in to
the region enclosed by the rubber-band box.
Double-clicking over an axes returns the axes to its initial zoom setting.
zoom off turns interactive zooming off.
zoom out returns the plot to its initial zoom setting.
zoom reset remembers the current zoom setting as the initial zoom setting.
Later calls to zoom out, or double-clicks when interactive zoom mode is
enabled, will return to this zoom level.
zoom toggles the interactive zoom status.
zoom xon and zoom yon set zoom on for the x- and y-axis, respectively.
zoom(factor) zooms in or out by the specified zoom factor, without affecting
the interactive zoom mode. Values greater than 1 zoom in by that amount,
while numbers greater than 0 and less than 1 zoom out by 1/factor.
zoom(fig, option) Any of the above options can be specified on a figure
other than the current figure using this syntax.
Remarks
zoom changes the axes limits by a factor of two (in or out) each time you
press the mouse button while the cursor is within an axes. You can also
click and drag the mouse to define a zoom area, or double-click to return to
the initial zoom level.
--------------------
Best fishes
Sam
----
Sam McClatchie,
Biological oceanography
South Australian Aquatic Sciences Centre
PO Box 120, Henley Beach 5022
Adelaide, South Australia
email <mcclatchie.sam at saugov.sa.gov.au>
Telephone: (61-8) 8207 5448
FAX: (61-8) 8207 5481
Research home page <http://www.members.iinet.net.au/~s.mcclatchie/>
/\
...>><xX(??>
//// \\\\
<??)Xx><<
///// \\\\\\
><(((??>
>><(((??> ...>><xX(??>O<??)Xx><<
On 6/21/05, McClatchie, Sam (PIRSA-SARDI) <mcclatchie.sam at saugov.sa.gov.au> wrote:> Background: > OS: Linux Mandrake 10.1 > release: R 2.0.0 > editor: GNU Emacs 21.3.2 > front-end: ESS 5.2.3 > --------------------------------- > Colleagues > > Is there a function in R that is an equivalent of zoom in matlab? This is > very useful for being able to magnify details in a plot. > > I have searched the help for "zoom", "interactive zooming", and "magnify". > The R search engine (reached from help.start() ) keywords by topic entry > for dynamic graphics seems to have no content, unless I made a mistake.>From within R try:RSiteSearch("zoom")
Try RSiteSearch("zoom plot"). There are some good suggestions there.
Cheers
Francisco
>From: "McClatchie, Sam (PIRSA-SARDI)" <mcclatchie.sam at
saugov.sa.gov.au>
>To: "R-Help-Request (E-mail)" <r-help at stat.math.ethz.ch>
>Subject: [R] R-help
>Date: Wed, 22 Jun 2005 09:05:05 +0930
>
>Background:
>OS: Linux Mandrake 10.1
>release: R 2.0.0
>editor: GNU Emacs 21.3.2
>front-end: ESS 5.2.3
>---------------------------------
>Colleagues
>
>Is there a function in R that is an equivalent of zoom in matlab? This is
>very useful for being able to magnify details in a plot.
>
>I have searched the help for "zoom", "interactive
zooming", and "magnify".
>The R search engine (reached from help.start() ) keywords by topic entry
>for dynamic graphics seems to have no content, unless I made a mistake.
>
>Here is the matlab function description:
>-------------------------------
>zoom
>
>Zoom in and out on a 2-D plot
>
>Syntax
>
>zoom on
>zoom off
>zoom out
>zoom reset
>zoom
>zoom xon
>zoom yon
>zoom(factor)
>zoom(fig, option)
>
>Description
>
>zoom on turns on interactive zooming. When interactive zooming is enabled
>in
>a figure, pressing a mouse button while your cursor is within an axes zooms
>into the point or out from the point beneath the mouse. Zooming changes the
>axes limits.
>
>
>* For a single-button mouse, zoom in by pressing the mouse button and
>zoom out by simultaneously pressing Shift and the mouse button.
>*
>* For a two- or three-button mouse, zoom in by pressing the left mouse
>button and zoom out by pressing the right mouse button.
>
>Clicking and dragging over an axes when interactive zooming is enabled
>draws
>a rubber-band box. When the mouse button is released, the axes zoom in to
>the region enclosed by the rubber-band box.
>
>Double-clicking over an axes returns the axes to its initial zoom setting.
>
>zoom off turns interactive zooming off.
>
>zoom out returns the plot to its initial zoom setting.
>
>zoom reset remembers the current zoom setting as the initial zoom setting.
>Later calls to zoom out, or double-clicks when interactive zoom mode is
>enabled, will return to this zoom level.
>
>zoom toggles the interactive zoom status.
>
>zoom xon and zoom yon set zoom on for the x- and y-axis, respectively.
>
>zoom(factor) zooms in or out by the specified zoom factor, without
>affecting
>the interactive zoom mode. Values greater than 1 zoom in by that amount,
>while numbers greater than 0 and less than 1 zoom out by 1/factor.
>
>zoom(fig, option) Any of the above options can be specified on a figure
>other than the current figure using this syntax.
>
>Remarks
>
>zoom changes the axes limits by a factor of two (in or out) each time you
>press the mouse button while the cursor is within an axes. You can also
>click and drag the mouse to define a zoom area, or double-click to return
>to
>the initial zoom level.
>--------------------
>
>Best fishes
>
>Sam
>----
>Sam McClatchie,
>Biological oceanography
>South Australian Aquatic Sciences Centre
>PO Box 120, Henley Beach 5022
>Adelaide, South Australia
>email <mcclatchie.sam at saugov.sa.gov.au>
>Telephone: (61-8) 8207 5448
>FAX: (61-8) 8207 5481
>Research home page <http://www.members.iinet.net.au/~s.mcclatchie/>
>
> /\
> ...>><xX(伆>
> //// \\\\
> <伆)Xx><<
> ///// \\\\\\
> ><(((伆>
> >><(((伆> ...>><xX(伆>O<伆)Xx><<
>
>______________________________________________
>R-help at 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
There is a function 'simMD()' in 'popgen' library which simulates a sample of genotype data as follows:> library(popgen) > x <- simMD(20, 2, 2, p = NULL, c(0.09, 0.05), ac = 2, beta = 1) > x, , 1 [,1] [,2] [1,] 1 1 [2,] 1 1 ... [37,] 1 2 [38,] 2 2 [39,] 2 2 [40,] 2 2 , , 2 [,1] [,2] [1,] 2 2 [2,] 1 2 [3,] 1 2 ... [38,] 2 1 [39,] 1 2 [40,] 1 2>How can I repeat this function, for example, 1000 times to generate 1000 samples and assign each output to distinct 'vector' Xi, where i=1,2,...,1000 The goal is to generate a large number of samples using this function and then use them in further analysis. Any suggestions would be appreciated Sitdikov Mansor