<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Statistics, R, Graphics and Fun &#187; Graphics Device</title>
	<atom:link href="http://yihui.name/en/tag/graphics-device/feed/" rel="self" type="application/rss+xml" />
	<link>http://yihui.name/en</link>
	<description>Yihui XIE</description>
	<lastBuildDate>Thu, 26 Aug 2010 03:32:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Identify Data Points in Off-Screen R Graphics Devices</title>
		<link>http://yihui.name/en/2009/03/identify-data-points-in-off-screen-r-graphics-devices/</link>
		<comments>http://yihui.name/en/2009/03/identify-data-points-in-off-screen-r-graphics-devices/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 11:31:49 +0000</pubDate>
		<dc:creator>Yihui Xie</dc:creator>
				<category><![CDATA[R Graphics]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Graphics Device]]></category>
		<category><![CDATA[identify()]]></category>

		<guid isPermaLink="false">http://yihui.name/en/?p=59</guid>
		<description><![CDATA[Today Ruya Gokhan Kocer asked me how to use the R function identify() in off-screen graphics devices. Actually it&#8217;s pretty easy as long as we obtain the list returned by identify(pos = TRUE). For example, # open a windows device x11() x = rnorm(20) y = rnorm(20) plot(x, y) # identify 5 points id = [...]]]></description>
			<content:encoded><![CDATA[<p>Today Ruya Gokhan Kocer asked me how to use the R function <code>identify()</code> in off-screen graphics devices. Actually it&#8217;s pretty easy as long as we obtain the list returned by <code>identify(pos = TRUE)</code>. For example,</p>
<span class="download"><a href="http://yihui.name/en/wp-content/uploads//1237202988_0.r">Downdload the file here</a></span>
<pre># open a windows device
x11()
x = rnorm(20)
y = rnorm(20)
plot(x, y)
# identify 5 points
id = identify(x, y, n = 5, pos = TRUE)

# $ind
# [1]  2  6 10 14 16
#
# $pos
# [1] 1 1 4 4 1

# then open a bitmap device
png("identify.png")
plot(x, y)
# use the information from above mouse click
text(x[id$ind], y[id$ind], id$ind, pos = id$pos)
dev.off()</pre>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://yihui.name/en/2010/03/font-families-for-the-r-pdf-device/" title="Font Families for the R PDF Device">Font Families for the R PDF Device</a></li><li><a href="http://yihui.name/en/2009/10/50000-revisions-committed-to-r/" title="50000 Revisions Committed to R">50000 Revisions Committed to R</a></li><li><a href="http://yihui.name/en/2008/09/to-see-a-circle-in-a-pile-of-sand/" title="To See A Circle in A Pile of Sand">To See A Circle in A Pile of Sand</a></li><li><a href="http://yihui.name/en/2007/12/availability-of-the-png-device-in-r/" title="Availability of the PNG Device in R">Availability of the PNG Device in R</a></li><li><a href="http://yihui.name/en/2007/12/make-optical-illusions-in-r-graphics-system/" title="Make Optical Illusions in R Graphics System">Make Optical Illusions in R Graphics System</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://yihui.name/en/2009/03/identify-data-points-in-off-screen-r-graphics-devices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
